summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 820f60e61..7ec613669 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1710,6 +1710,11 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
1710 system->RegisterExecuteProgramCallback( 1710 system->RegisterExecuteProgramCallback(
1711 [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); }); 1711 [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); });
1712 1712
1713 system->RegisterExitCallback([this] {
1714 emu_thread->ForceStop();
1715 render_window->Exit();
1716 });
1717
1713 connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame); 1718 connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
1714 connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity); 1719 connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
1715 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views 1720 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
@@ -4143,6 +4148,10 @@ bool GMainWindow::ConfirmForceLockedExit() {
4143} 4148}
4144 4149
4145void GMainWindow::RequestGameExit() { 4150void GMainWindow::RequestGameExit() {
4151 if (!system->IsPoweredOn()) {
4152 return;
4153 }
4154
4146 auto& sm{system->ServiceManager()}; 4155 auto& sm{system->ServiceManager()};
4147 auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); 4156 auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
4148 auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); 4157 auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");