add option to build with console subsystem on Wind
This commit is contained in:
parent
9c42d3a7b3
commit
83007601f7
|
@ -122,6 +122,7 @@ option(WITH_DEMOS "Install demo songs" ON)
|
|||
option(WITH_INSTRUMENTS "Install instruments" ON)
|
||||
option(WITH_WAVETABLES "Install wavetables" ON)
|
||||
option(SHOW_OPEN_ASSETS_MENU_ENTRY "Show option to open built-in assets directory (on supported platforms)" OFF)
|
||||
option(CONSOLE_SUBSYSTEM "Build Furnace with Console subsystem on Windows" OFF)
|
||||
if (APPLE)
|
||||
option(FORCE_APPLE_BIN "Force enable binary installation to /bin" OFF)
|
||||
else()
|
||||
|
@ -1128,9 +1129,13 @@ if (NOT ANDROID OR TERMUX)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32 AND CONSOLE_SUBSYSTEM)
|
||||
list(APPEND DEPENDENCIES_DEFINES "TA_SUBSYSTEM_CONSOLE")
|
||||
endif()
|
||||
|
||||
if(ANDROID AND NOT TERMUX)
|
||||
add_library(furnace SHARED ${USED_SOURCES})
|
||||
elseif(WIN32)
|
||||
elseif(WIN32 AND NOT CONSOLE_SUBSYSTEM)
|
||||
add_executable(furnace WIN32 ${USED_SOURCES})
|
||||
else()
|
||||
add_executable(furnace ${USED_SOURCES})
|
||||
|
|
|
@ -2665,6 +2665,7 @@ class FurnaceGUI {
|
|||
void drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUIMacroEditState& state);
|
||||
void alterSampleMap(int column, int val);
|
||||
|
||||
void insTabFM(DivInstrument* ins);
|
||||
void insTabSample(DivInstrument* ins);
|
||||
|
||||
void drawOrderButtons();
|
||||
|
|
|
@ -451,12 +451,13 @@ int main(int argc, char** argv) {
|
|||
|
||||
// Windows console thing - thanks dj.tuBIG/MaliceX
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifndef TA_SUBSYSTEM_CONSOLE
|
||||
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
freopen("CONOUT$", "w", stderr);
|
||||
freopen("CONIN$", "r", stdin);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
srand(time(NULL));
|
||||
|
|
Loading…
Reference in a new issue