fix: fix Bmap build issue. add banner for Unvirt
This commit is contained in:
parent
65861143bf
commit
85ff80cbf7
|
@ -1,5 +1,5 @@
|
||||||
#include "BMExports.hpp"
|
#include "BMExports.hpp"
|
||||||
#include <IronPad.hpp>
|
#include <YYCCommonplace.hpp>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -54,8 +54,11 @@ _Ty CheckGeneralObject(BMap::BMFile* possible_bmfile, LibCmo::CK2::CK_ID possibl
|
||||||
bool BMInit() {
|
bool BMInit() {
|
||||||
if (CheckInited()) return false;
|
if (CheckInited()) return false;
|
||||||
|
|
||||||
// register IronPad
|
// register exception handler if we are in Windows.
|
||||||
IronPad::IronPadRegister();
|
#if YYCC_OS == YYCC_OS_WINDOWS
|
||||||
|
YYCC::ExceptionHelper::Register();
|
||||||
|
#endif
|
||||||
|
|
||||||
// and startup CK environment
|
// and startup CK environment
|
||||||
LibCmo::CK2::CKStartUp();
|
LibCmo::CK2::CKStartUp();
|
||||||
|
|
||||||
|
@ -84,8 +87,11 @@ bool BMDispose() {
|
||||||
|
|
||||||
// shutdown CK environment
|
// shutdown CK environment
|
||||||
LibCmo::CK2::CKShutdown();
|
LibCmo::CK2::CKShutdown();
|
||||||
// unregister iron pad
|
|
||||||
IronPad::IronPadUnregister();
|
// unregister exception handler if we are in Windows
|
||||||
|
#if YYCC_OS == YYCC_OS_WINDOWS
|
||||||
|
YYCC::ExceptionHelper::Unregister();
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,6 +255,7 @@ namespace BMap {
|
||||||
cache.emplace_back(encodings[i]);
|
cache.emplace_back(encodings[i]);
|
||||||
}
|
}
|
||||||
m_Context->SetEncoding(cache);
|
m_Context->SetEncoding(cache);
|
||||||
|
m_IsInitError = m_IsInitError || !m_Context->IsValidEncoding();
|
||||||
|
|
||||||
// set default texture save mode is external
|
// set default texture save mode is external
|
||||||
m_Context->SetGlobalImagesSaveOptions(LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_EXTERNAL);
|
m_Context->SetGlobalImagesSaveOptions(LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_EXTERNAL);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.23)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(NeMo
|
project(NeMo
|
||||||
VERSION 0.1.0
|
VERSION 0.2.0
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -281,8 +281,8 @@ namespace Unvirt::Context {
|
||||||
YYCC::ConsoleHelper::EnableColorfulConsole();
|
YYCC::ConsoleHelper::EnableColorfulConsole();
|
||||||
|
|
||||||
// Show banner
|
// Show banner
|
||||||
YYCC::ConsoleHelper::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"Unvirt"));
|
YYCC::ConsoleHelper::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"Unvirt 0.2.0") " build at " __DATE__ " " __TIME__);
|
||||||
YYCC::ConsoleHelper::WriteLine(YYCC_COLOR_LIGHT_YELLOW(u8"Type 'help' for more infomation. Type 'exit' to quit."));
|
YYCC::ConsoleHelper::WriteLine(u8"Type 'help' for more infomation. Type 'exit' to quit.");
|
||||||
|
|
||||||
// start process loop
|
// start process loop
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user