diff options
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index ab12dd15d..cb301e78b 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -21,6 +21,7 @@ #include "common/string_util.h" #include "common/telemetry.h" #include "core/core.h" +#include "core/cpu_manager.h" #include "core/crypto/key_manager.h" #include "core/file_sys/registered_cache.h" #include "core/file_sys/vfs_real.h" @@ -138,6 +139,12 @@ int main(int argc, char** argv) { Config config{config_path}; + // apply the log_filter setting + // the logger was initialized before and doesn't pick up the filter on its own + Common::Log::Filter filter; + filter.ParseFilterString(Settings::values.log_filter.GetValue()); + Common::Log::SetGlobalFilter(filter); + if (!program_args.empty()) { Settings::values.program_args = program_args; } @@ -210,6 +217,7 @@ int main(int argc, char** argv) { // Core is loaded, start the GPU (makes the GPU contexts current to this thread) system.GPU().Start(); + system.GetCpuManager().OnGpuReady(); if (Settings::values.use_disk_shader_cache.GetValue()) { system.Renderer().ReadRasterizer()->LoadDiskResources( @@ -217,10 +225,19 @@ int main(int argc, char** argv) { [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); } + system.RegisterExitCallback([&] { + // Just exit right away. + exit(0); + }); + void(system.Run()); + if (system.DebuggerEnabled()) { + system.InitializeDebugger(); + } while (emu_window->IsOpen()) { emu_window->WaitEvent(); } + system.DetachDebugger(); void(system.Pause()); system.Shutdown(); |