mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
enable virtual terminal processing on Windows
This commit is contained in:
parent
829d51411a
commit
c6f1ec5756
2 changed files with 12 additions and 3 deletions
|
@ -53,8 +53,8 @@
|
|||
#define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock();
|
||||
#define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false;
|
||||
|
||||
#define DIV_VERSION "dev149"
|
||||
#define DIV_ENGINE_VERSION 149
|
||||
#define DIV_VERSION "dev151"
|
||||
#define DIV_ENGINE_VERSION 151
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
11
src/log.cpp
11
src/log.cpp
|
@ -134,7 +134,16 @@ int writeLog(int level, const char* msg, fmt::printf_args args) {
|
|||
}
|
||||
|
||||
void initLog() {
|
||||
// initalize log buffer
|
||||
// initialize coloring on Windows
|
||||
#ifdef _WIN32
|
||||
HANDLE winout=GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
int termprop=0;
|
||||
GetConsoleMode(winout,(LPDWORD)&termprop);
|
||||
termprop|=ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
SetConsoleMode(winout,termprop);
|
||||
#endif
|
||||
|
||||
// initialize log buffer
|
||||
logPosition=0;
|
||||
for (int i=0; i<TA_LOG_SIZE; i++) {
|
||||
logEntries[i].text.reserve(128);
|
||||
|
|
Loading…
Reference in a new issue