diff options
| author | 2019-09-23 00:37:12 +1000 | |
|---|---|---|
| committer | 2019-09-23 00:37:12 +1000 | |
| commit | aaec1562f8631303d1a5abb6c75f2422d6d7cf71 (patch) | |
| tree | 283ac1330252c06b3a1741730ce49f4182330150 /src/core/core.cpp | |
| parent | Merge pull request #2889 from FearlessTobi/adwsawdawd (diff) | |
| parent | main: Use const on all variable initializations (diff) | |
| download | yuzu-aaec1562f8631303d1a5abb6c75f2422d6d7cf71.tar.gz yuzu-aaec1562f8631303d1a5abb6c75f2422d6d7cf71.tar.xz yuzu-aaec1562f8631303d1a5abb6c75f2422d6d7cf71.zip | |
Merge pull request #2683 from DarkLordZach/lock-exit
am: Implement exit locking and self exit commands
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 76bb2bae9..92ba42fb9 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 | ||
| @@ -249,6 +250,7 @@ struct System::Impl { | |||
| 249 | perf_stats->GetMeanFrametime()); | 250 | perf_stats->GetMeanFrametime()); |
| 250 | 251 | ||
| 251 | is_powered_on = false; | 252 | is_powered_on = false; |
| 253 | exit_lock = false; | ||
| 252 | 254 | ||
| 253 | // Shutdown emulation session | 255 | // Shutdown emulation session |
| 254 | renderer.reset(); | 256 | renderer.reset(); |
| @@ -333,6 +335,7 @@ struct System::Impl { | |||
| 333 | std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager; | 335 | std::unique_ptr<Core::Hardware::InterruptManager> interrupt_manager; |
| 334 | CpuCoreManager cpu_core_manager; | 336 | CpuCoreManager cpu_core_manager; |
| 335 | bool is_powered_on = false; | 337 | bool is_powered_on = false; |
| 338 | bool exit_lock = false; | ||
| 336 | 339 | ||
| 337 | std::unique_ptr<Memory::CheatEngine> cheat_engine; | 340 | std::unique_ptr<Memory::CheatEngine> cheat_engine; |
| 338 | std::unique_ptr<Tools::Freezer> memory_freezer; | 341 | std::unique_ptr<Tools::Freezer> memory_freezer; |
| @@ -629,6 +632,14 @@ const Service::APM::Controller& System::GetAPMController() const { | |||
| 629 | return impl->apm_controller; | 632 | return impl->apm_controller; |
| 630 | } | 633 | } |
| 631 | 634 | ||
| 635 | void System::SetExitLock(bool locked) { | ||
| 636 | impl->exit_lock = locked; | ||
| 637 | } | ||
| 638 | |||
| 639 | bool System::GetExitLock() const { | ||
| 640 | return impl->exit_lock; | ||
| 641 | } | ||
| 642 | |||
| 632 | System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { | 643 | System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { |
| 633 | return impl->Init(*this, emu_window); | 644 | return impl->Init(*this, emu_window); |
| 634 | } | 645 | } |