diff --git a/CMakeLists.txt b/CMakeLists.txt index f994cfd55..bd93c9191 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -780,6 +780,8 @@ endif() if(ANDROID AND NOT TERMUX) add_library(furnace SHARED ${USED_SOURCES}) +elseif(WIN32) + add_executable(furnace WIN32 ${USED_SOURCES}) else() add_executable(furnace ${USED_SOURCES}) endif() diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 85effd03c..8efde4e39 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -1481,6 +1481,7 @@ void DivEngine::createNewFromDefaults() { bool oldVol=getConfInt("configVersion",DIV_ENGINE_VERSION)<135; if (preset.empty()) { // try loading old preset + logD("trying to load old preset"); preset=decodeSysDesc(getConfString("initialSys","")); oldVol=false; } @@ -4468,6 +4469,7 @@ bool DivEngine::init() { bool oldVol=getConfInt("configVersion",DIV_ENGINE_VERSION)<135; if (preset.empty()) { // try loading old preset + logD("trying to load old preset"); preset=decodeSysDesc(getConfString("initialSys","")); oldVol=false; } diff --git a/src/engine/engine.h b/src/engine/engine.h index 298ef958a..32d4c9fad 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -47,8 +47,8 @@ #define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock(); #define BUSY_END isBusy.unlock(); softLocked=false; -#define DIV_VERSION "0.6pre4" -#define DIV_ENGINE_VERSION 143 +#define DIV_VERSION "0.6pre4-hotfix" +#define DIV_ENGINE_VERSION 144 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 diff --git a/src/gui/about.cpp b/src/gui/about.cpp index f156e83fd..abed9c422 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -34,6 +34,7 @@ const char* aboutLine[]={ "", "-- program --", "tildearrow", + "A M 4 N (intro tune)", "akumanatt", "cam900", "djtuBIG-MaliceX", diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 1ee4fdd7e..c98ef7cbb 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -2758,6 +2758,7 @@ void FurnaceGUI::syncSettings() { settings.initialSys.set(fmt::sprintf("pan%d",i),newPan); } e->setConf("initialSys2",settings.initialSys.toBase64()); + e->setConf("configVersion",DIV_ENGINE_VERSION); } } diff --git a/src/main.cpp b/src/main.cpp index d8cc440b6..6ebedae31 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -342,12 +342,14 @@ void reportError(String what) { // TODO: CoInitializeEx on Windows? // TODO: add crash log int main(int argc, char** argv) { - // Windows console thing - thanks MarioKart7z! + // Windows console thing - thanks dj.tuBIG/MaliceX #ifdef _WIN32 - DWORD winPID; - HWND winConsole=GetConsoleWindow(); - GetWindowThreadProcessId(winConsole,&winPID); - if (GetCurrentProcessId()==winPID) FreeConsole(); + + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + freopen("CONIN$", "r", stdin); + } #endif initLog();