diff options
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 7 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 10 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 9 |
4 files changed, 26 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index fc16f0f0c..fc4744fb0 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -344,6 +344,8 @@ void Config::ReadValues() { | |||
| 344 | ReadSetting("Debugging", Settings::values.use_debug_asserts); | 344 | ReadSetting("Debugging", Settings::values.use_debug_asserts); |
| 345 | ReadSetting("Debugging", Settings::values.use_auto_stub); | 345 | ReadSetting("Debugging", Settings::values.use_auto_stub); |
| 346 | ReadSetting("Debugging", Settings::values.disable_macro_jit); | 346 | ReadSetting("Debugging", Settings::values.disable_macro_jit); |
| 347 | ReadSetting("Debugging", Settings::values.use_gdbstub); | ||
| 348 | ReadSetting("Debugging", Settings::values.gdbstub_port); | ||
| 347 | 349 | ||
| 348 | const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); | 350 | const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); |
| 349 | std::stringstream ss(title_list); | 351 | std::stringstream ss(title_list); |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index f34d6b728..a3b8432f5 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -218,7 +218,7 @@ cpuopt_unsafe_ignore_global_monitor = | |||
| 218 | 218 | ||
| 219 | [Renderer] | 219 | [Renderer] |
| 220 | # Which backend API to use. | 220 | # Which backend API to use. |
| 221 | # 0 (default): OpenGL, 1: Vulkan | 221 | # 0: OpenGL, 1 (default): Vulkan |
| 222 | backend = | 222 | backend = |
| 223 | 223 | ||
| 224 | # Enable graphics API debugging mode. | 224 | # Enable graphics API debugging mode. |
| @@ -437,6 +437,11 @@ disable_macro_jit=false | |||
| 437 | # Presents guest frames as they become available. Experimental. | 437 | # Presents guest frames as they become available. Experimental. |
| 438 | # false: Disabled (default), true: Enabled | 438 | # false: Disabled (default), true: Enabled |
| 439 | disable_fps_limit=false | 439 | disable_fps_limit=false |
| 440 | # Determines whether to enable the GDB stub and wait for the debugger to attach before running. | ||
| 441 | # false: Disabled (default), true: Enabled | ||
| 442 | use_gdbstub=false | ||
| 443 | # The port to use for the GDB server, if it is enabled. | ||
| 444 | gdbstub_port=6543 | ||
| 440 | 445 | ||
| 441 | [WebService] | 446 | [WebService] |
| 442 | # Whether or not to enable telemetry | 447 | # Whether or not to enable telemetry |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 71c413e64..8e38724db 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -162,7 +162,15 @@ void EmuWindow_SDL2::WaitEvent() { | |||
| 162 | SDL_Event event; | 162 | SDL_Event event; |
| 163 | 163 | ||
| 164 | if (!SDL_WaitEvent(&event)) { | 164 | if (!SDL_WaitEvent(&event)) { |
| 165 | LOG_CRITICAL(Frontend, "SDL_WaitEvent failed: {}", SDL_GetError()); | 165 | const char* error = SDL_GetError(); |
| 166 | if (!error || strcmp(error, "") == 0) { | ||
| 167 | // https://github.com/libsdl-org/SDL/issues/5780 | ||
| 168 | // Sometimes SDL will return without actually having hit an error condition; | ||
| 169 | // just ignore it in this case. | ||
| 170 | return; | ||
| 171 | } | ||
| 172 | |||
| 173 | LOG_CRITICAL(Frontend, "SDL_WaitEvent failed: {}", error); | ||
| 166 | exit(1); | 174 | exit(1); |
| 167 | } | 175 | } |
| 168 | 176 | ||
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index ab12dd15d..0dce5e274 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -217,10 +217,19 @@ int main(int argc, char** argv) { | |||
| 217 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); | 217 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | system.RegisterExitCallback([&] { | ||
| 221 | // Just exit right away. | ||
| 222 | exit(0); | ||
| 223 | }); | ||
| 224 | |||
| 220 | void(system.Run()); | 225 | void(system.Run()); |
| 226 | if (system.DebuggerEnabled()) { | ||
| 227 | system.InitializeDebugger(); | ||
| 228 | } | ||
| 221 | while (emu_window->IsOpen()) { | 229 | while (emu_window->IsOpen()) { |
| 222 | emu_window->WaitEvent(); | 230 | emu_window->WaitEvent(); |
| 223 | } | 231 | } |
| 232 | system.DetachDebugger(); | ||
| 224 | void(system.Pause()); | 233 | void(system.Pause()); |
| 225 | system.Shutdown(); | 234 | system.Shutdown(); |
| 226 | 235 | ||