mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +01:00
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:
parent
810b86f451
commit
4be2f12914
@ -14,16 +14,13 @@
|
|||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
void ToggleConsole() {
|
void ToggleConsole() {
|
||||||
static bool first_call = true, console_shown = true;
|
static bool console_shown = false;
|
||||||
if (!first_call) {
|
|
||||||
if (console_shown == UISettings::values.show_console) {
|
if (console_shown == UISettings::values.show_console) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
console_shown = UISettings::values.show_console;
|
console_shown = UISettings::values.show_console;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
first_call = false;
|
|
||||||
}
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
FILE* temp;
|
FILE* temp;
|
||||||
if (UISettings::values.show_console) {
|
if (UISettings::values.show_console) {
|
||||||
|
Loading…
Reference in New Issue
Block a user