summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-07-06 19:08:33 +0200
committerZach Hilman <zachhilman@gmail.com>2019-09-22 04:23:44 +0200
commitbbc143718835f62878b408700380b7f56741f259 (patch)
treeafc4b53be22ccd222e881d9cf07316416784cde9 /src/core
parentMerge pull request #2612 from DarkLordZach/prepo-new (diff)
downloadyuzu-bbc143718835f62878b408700380b7f56741f259.tar
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.gz
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.bz2
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.lz
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.xz
yuzu-bbc143718835f62878b408700380b7f56741f259.tar.zst
yuzu-bbc143718835f62878b408700380b7f56741f259.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp11
-rw-r--r--src/core/core.h4
2 files changed, 15 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 {
gpu_core = VideoCore::CreateGPU(system);
is_powered_on = true;
+ exit_lock = false;
LOG_DEBUG(Core, "Initialized OK");
@@ -244,6 +245,7 @@ struct System::Impl {
perf_stats->GetMeanFrametime());
is_powered_on = false;
+ exit_lock = false;
// Shutdown emulation session
renderer.reset();
@@ -328,6 +330,7 @@ struct System::Impl {
std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager;
CpuCoreManager cpu_core_manager;
bool is_powered_on = false;
+ bool exit_lock = false;
std::unique_ptr<FileSys::CheatEngine> cheat_engine;
std::unique_ptr<Tools::Freezer> memory_freezer;
@@ -624,6 +627,14 @@ const Service::APM::Controller& System::GetAPMController() const {
return impl->apm_controller;
}
+void System::SetExitLock(bool locked) {
+ impl->exit_lock = locked;
+}
+
+bool System::GetExitLock() const {
+ return impl->exit_lock;
+}
+
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
return impl->Init(*this, emu_window);
}
diff --git a/src/core/core.h b/src/core/core.h
index bb2962fdd..9874ee487 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -322,6 +322,10 @@ public:
const Service::APM::Controller& GetAPMController() const;
+ void SetExitLock(bool locked);
+
+ bool GetExitLock() const;
+
private:
System();