From 020d005d8c0f5212790b5d4503bd6d6550509f30 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 12 Jul 2018 01:09:03 -0600 Subject: [PATCH 1/2] yuzu-cmd Apply the filter string from settings --- src/yuzu_cmd/yuzu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 8ddd202d8c..5f67ae4eeb 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -127,6 +127,7 @@ int main(int argc, char** argv) { #endif Log::Filter log_filter(Log::Level::Debug); + log_filter.ParseFilterString(Settings::values.log_filter); Log::SetGlobalFilter(log_filter); Log::AddBackend(std::make_unique()); @@ -142,8 +143,6 @@ int main(int argc, char** argv) { return -1; } - log_filter.ParseFilterString(Settings::values.log_filter); - // Apply the command line arguments Settings::values.gdbstub_port = gdb_port; Settings::values.use_gdbstub = use_gdbstub; From b30c5370b10a4a0fc2710067c8faa72ea03a5f80 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 12 Jul 2018 01:11:43 -0600 Subject: [PATCH 2/2] yuzu - Fix duplicate logs --- src/yuzu/debugger/console.cpp | 7 +++++++ src/yuzu/main.cpp | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/yuzu/debugger/console.cpp b/src/yuzu/debugger/console.cpp index e3d2d975f8..320898f6af 100644 --- a/src/yuzu/debugger/console.cpp +++ b/src/yuzu/debugger/console.cpp @@ -14,6 +14,13 @@ namespace Debugger { void ToggleConsole() { + static bool console_shown = false; + if (console_shown == UISettings::values.show_console) { + return; + } else { + console_shown = UISettings::values.show_console; + } + #if defined(_WIN32) && !defined(_DEBUG) FILE* temp; if (UISettings::values.show_console) { diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 05a8ae6d21..9ce8d7c27e 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -908,8 +908,6 @@ void GMainWindow::UpdateUITheme() { #endif int main(int argc, char* argv[]) { - Log::AddBackend(std::make_unique()); - MicroProfileOnThreadCreate("Frontend"); SCOPE_EXIT({ MicroProfileShutdown(); });