diff options
author | Liam <byteslice@airmail.cc> | 2022-12-12 21:38:20 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-12-12 21:38:20 -0500 |
commit | 179adee396e6b8480d52be5314979830beebfbc1 (patch) | |
tree | a0cbfaf66a546f3717db1c3090af39d909f9800c /src/yuzu/main.cpp | |
parent | f44c60321ec767b6e881160d4960345d678edf78 (diff) |
emu_thread: properly force shutdown for unresponsive guest programs
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b38957d9a2..b3ae03eaf5 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1792,12 +1792,14 @@ void GMainWindow::ShutdownGame() { discord_rpc->Pause(); RequestGameExit(); - emu_thread->RequestStop(); emit EmulationStopping(); // Wait for emulation thread to complete and delete it - emu_thread->wait(); + if (!emu_thread->wait(5000)) { + emu_thread->ForceStop(); + emu_thread->wait(); + } emu_thread = nullptr; emulation_running = false; |