summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/bootmanager.cpp1
-rw-r--r--src/yuzu/main.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 13782869d..3d560f303 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -78,7 +78,6 @@ void EmuThread::run() {
78 gpu.Start(); 78 gpu.Start();
79 79
80 m_system.GetCpuManager().OnGpuReady(); 80 m_system.GetCpuManager().OnGpuReady();
81 m_system.RegisterExitCallback([this] { m_stop_source.request_stop(); });
82 81
83 if (m_system.DebuggerEnabled()) { 82 if (m_system.DebuggerEnabled()) {
84 m_system.InitializeDebugger(); 83 m_system.InitializeDebugger();
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index c67fb997a..6121711e0 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1711,6 +1711,11 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
1711 system->RegisterExecuteProgramCallback( 1711 system->RegisterExecuteProgramCallback(
1712 [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); }); 1712 [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); });
1713 1713
1714 system->RegisterExitCallback([this] {
1715 emu_thread->ForceStop();
1716 render_window->Exit();
1717 });
1718
1714 connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame); 1719 connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
1715 connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity); 1720 connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
1716 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views 1721 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
@@ -4178,6 +4183,10 @@ bool GMainWindow::ConfirmForceLockedExit() {
4178} 4183}
4179 4184
4180void GMainWindow::RequestGameExit() { 4185void GMainWindow::RequestGameExit() {
4186 if (!system->IsPoweredOn()) {
4187 return;
4188 }
4189
4181 auto& sm{system->ServiceManager()}; 4190 auto& sm{system->ServiceManager()};
4182 auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); 4191 auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
4183 auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); 4192 auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");