mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 07:18:13 -05:00
let games gracefully exit
This commit is contained in:
@ -1707,9 +1707,6 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
||||
system->RegisterExecuteProgramCallback(
|
||||
[this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); });
|
||||
|
||||
// Register an Exit callback such that Core can exit the currently running application.
|
||||
system->RegisterExitCallback([this]() { render_window->Exit(); });
|
||||
|
||||
connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
|
||||
connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
|
||||
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
|
||||
@ -1793,6 +1790,8 @@ void GMainWindow::ShutdownGame() {
|
||||
system->SetShuttingDown(true);
|
||||
system->DetachDebugger();
|
||||
discord_rpc->Pause();
|
||||
|
||||
RequestGameExit();
|
||||
emu_thread->RequestStop();
|
||||
|
||||
emit EmulationStopping();
|
||||
|
Reference in New Issue
Block a user