diff options
| author | bunnei <bunneidev@gmail.com> | 2016-08-29 21:28:31 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2016-08-29 21:42:31 -0400 |
| commit | e3672db86691572eebcfeee91ace87ab1cb58cef (patch) | |
| tree | 586d402c0b7e1e9ddd732eb1cc1d5ffcd22d3f22 /src/core/system.cpp | |
| parent | cfefb55db205a2c706c415060b5ea95c432075b7 (diff) | |
system: Add a function to see if the emulator is running.
Diffstat (limited to 'src/core/system.cpp')
| -rw-r--r-- | src/core/system.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/system.cpp b/src/core/system.cpp index 4a4757af38..4fc266cb09 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -17,6 +17,8 @@ namespace System { +static bool is_powered_on{ false }; + Result Init(EmuWindow* emu_window) { Core::Init(); CoreTiming::Init(); @@ -30,9 +32,15 @@ Result Init(EmuWindow* emu_window) { AudioCore::Init(); GDBStub::Init(); + is_powered_on = true; + return Result::Success; } +bool IsPoweredOn() { + return is_powered_on; +} + void Shutdown() { GDBStub::Shutdown(); AudioCore::Shutdown(); @@ -42,6 +50,8 @@ void Shutdown() { HW::Shutdown(); CoreTiming::Shutdown(); Core::Shutdown(); + + is_powered_on = false; } } // namespace |
