summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-07-06 13:08:33 -0400
committerGravatar Zach Hilman2019-09-21 22:23:44 -0400
commitbbc143718835f62878b408700380b7f56741f259 (patch)
treeafc4b53be22ccd222e881d9cf07316416784cde9 /src/core/core.cpp
parentMerge pull request #2612 from DarkLordZach/prepo-new (diff)
downloadyuzu-bbc143718835f62878b408700380b7f56741f259.tar.gz
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.xz
yuzu-bbc143718835f62878b408700380b7f56741f259.zip
core: Track system exit lock status
Used to determine if yuzu should confirm before pausing or stopping a game.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index f22244cf7..c1bc92782 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -163,6 +163,7 @@ struct System::Impl {
163 gpu_core = VideoCore::CreateGPU(system); 163 gpu_core = VideoCore::CreateGPU(system);
164 164
165 is_powered_on = true; 165 is_powered_on = true;
166 exit_lock = false;
166 167
167 LOG_DEBUG(Core, "Initialized OK"); 168 LOG_DEBUG(Core, "Initialized OK");
168 169
@@ -244,6 +245,7 @@ struct System::Impl {
244 perf_stats->GetMeanFrametime()); 245 perf_stats->GetMeanFrametime());
245 246
246 is_powered_on = false; 247 is_powered_on = false;
248 exit_lock = false;
247 249
248 // Shutdown emulation session 250 // Shutdown emulation session
249 renderer.reset(); 251 renderer.reset();
@@ -328,6 +330,7 @@ struct System::Impl {
328 std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager; 330 std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager;
329 CpuCoreManager cpu_core_manager; 331 CpuCoreManager cpu_core_manager;
330 bool is_powered_on = false; 332 bool is_powered_on = false;
333 bool exit_lock = false;
331 334
332 std::unique_ptr<FileSys::CheatEngine> cheat_engine; 335 std::unique_ptr<FileSys::CheatEngine> cheat_engine;
333 std::unique_ptr<Tools::Freezer> memory_freezer; 336 std::unique_ptr<Tools::Freezer> memory_freezer;
@@ -624,6 +627,14 @@ const Service::APM::Controller& System::GetAPMController() const {
624 return impl->apm_controller; 627 return impl->apm_controller;
625} 628}
626 629
630void System::SetExitLock(bool locked) {
631 impl->exit_lock = locked;
632}
633
634bool System::GetExitLock() const {
635 return impl->exit_lock;
636}
637
627System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { 638System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
628 return impl->Init(*this, emu_window); 639 return impl->Init(*this, emu_window);
629} 640}