win32: allow debug console showage to be overridden with ini file [Display] Show Console=1

This commit is contained in:
zeromus 2010-12-31 18:07:07 +00:00
parent bb0ceffcd5
commit ca198d08bf
2 changed files with 11 additions and 10 deletions

View File

@ -25,7 +25,6 @@
///////////////////////////////////////////////////////////////// Console
#if !defined(PUBLIC_RELEASE) || defined(DEVELOPER)
#define BUFFER_SIZE 100
HANDLE hConsole = NULL;
void printlog(const char *fmt, ...);
@ -117,9 +116,3 @@ void printlog(const char *fmt, ...)
va_end(list);
WriteConsole(hConsole,msg, (DWORD)strlen(msg), &tmp, 0);
}
#else
void OpenConsole() {}
void CloseConsole() {}
#endif

View File

@ -2556,8 +2556,6 @@ int _main()
char text[80];
GetINIPath();
path.ReadPathSettings();
CommonSettings.cheatsDisable = GetPrivateProfileBool("General", "cheatsDisable", false, IniName);
@ -3051,6 +3049,16 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
g_thread_init (NULL);
hAppInst=hThisInstance;
GetINIPath();
#if !defined(PUBLIC_RELEASE) || defined(DEVELOPER)
static const bool defaultConsoleEnable = true;
#else
static const bool defaultConsoleEnable = false;
#endif
if(GetPrivateProfileBool("Display", "Show Console", defaultConsoleEnable, IniName))
OpenConsole(); // Init debug console
int ret = _main();