Skip to content

Commit

Permalink
Hide console window on Windows by default
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Aug 26, 2015
1 parent 6c0bac7 commit fe22eda
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine/client/client.cpp
Expand Up @@ -3348,6 +3348,11 @@ int main(int argc, const char **argv) // ignore_convention
FifoConsole *fifoConsole = new FifoConsole(pConsole, g_Config.m_ClInputFifo, CFGFLAG_CLIENT);
#endif

#if defined(CONF_FAMILY_WINDOWS)
if(!g_Config.m_ClShowConsole)
ShowWindow(GetConsoleWindow(), SW_HIDE);
#endif

// run the client
dbg_msg("client", "starting...");
pClient->Run();
Expand Down
1 change: 1 addition & 0 deletions src/engine/shared/config_variables.h
Expand Up @@ -348,6 +348,7 @@ MACRO_CONFIG_INT(ClConfirmDisconnect, cl_confirm_disconnect, 0, 0, 1, CFGFLAG_SA
MACRO_CONFIG_STR(ClTimeoutCode, cl_timeout_code, 64, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Timeout code to use")
MACRO_CONFIG_STR(ClDummyTimeoutCode, cl_dummy_timeout_code, 64, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Dummy Timeout code to use")
MACRO_CONFIG_STR(ClInputFifo, cl_input_fifo, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Fifo file to use as input for client console")
MACRO_CONFIG_INT(ClShowConsole, cl_show_console, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show console window (Windows only)")
#if defined(__ANDROID__)
MACRO_CONFIG_INT(InpJoystick, inp_joystick, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Try to use a joystick as input")
#else
Expand Down
6 changes: 6 additions & 0 deletions src/game/client/components/menus_settings.cpp
Expand Up @@ -199,6 +199,12 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
Button.HMargin(2.0f, &Button);
g_Config.m_ClCpuThrottle= static_cast<int>(DoScrollbarH(&g_Config.m_ClCpuThrottle, &Button, g_Config.m_ClCpuThrottle/100.0f)*100.0f+0.1f);

#if defined(CONF_FAMILY_WINDOWS)
Left.HSplitTop(20.0f, &Button, &Left);
if(DoButton_CheckBox(&g_Config.m_ClShowConsole, Localize("Show console window"), g_Config.m_ClShowConsole, &Button))
g_Config.m_ClShowConsole ^= 1;
#endif

// auto statboard screenshot
{
Right.HSplitTop(20.0f, 0, &Right); //
Expand Down

0 comments on commit fe22eda

Please sign in to comment.