log/console: no need to test first call

Just let `console_shown` be initialized to the default status (console isn't shown on startup)
This commit is contained in:
Weiyi Wang 2018-07-02 19:39:13 +03:00 committed by GitHub
parent 810b86f451
commit 4be2f12914
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,16 +14,13 @@
namespace Debugger {
void ToggleConsole() {
static bool first_call = true, console_shown = true;
if (!first_call) {
static bool console_shown = false;
if (console_shown == UISettings::values.show_console) {
return;
} else {
console_shown = UISettings::values.show_console;
}
} else {
first_call = false;
}
#ifdef _WIN32
FILE* temp;
if (UISettings::values.show_console) {