summaryrefslogtreecommitdiff
path: root/src/core/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/system.cpp')
-rw-r--r--src/core/system.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/system.cpp b/src/core/system.cpp
index 4a4757af3..4fc266cb0 100644
--- a/src/core/system.cpp
+++ b/src/core/system.cpp
@@ -17,6 +17,8 @@
17 17
18namespace System { 18namespace System {
19 19
20static bool is_powered_on{ false };
21
20Result Init(EmuWindow* emu_window) { 22Result Init(EmuWindow* emu_window) {
21 Core::Init(); 23 Core::Init();
22 CoreTiming::Init(); 24 CoreTiming::Init();
@@ -30,9 +32,15 @@ Result Init(EmuWindow* emu_window) {
30 AudioCore::Init(); 32 AudioCore::Init();
31 GDBStub::Init(); 33 GDBStub::Init();
32 34
35 is_powered_on = true;
36
33 return Result::Success; 37 return Result::Success;
34} 38}
35 39
40bool IsPoweredOn() {
41 return is_powered_on;
42}
43
36void Shutdown() { 44void Shutdown() {
37 GDBStub::Shutdown(); 45 GDBStub::Shutdown();
38 AudioCore::Shutdown(); 46 AudioCore::Shutdown();
@@ -42,6 +50,8 @@ void Shutdown() {
42 HW::Shutdown(); 50 HW::Shutdown();
43 CoreTiming::Shutdown(); 51 CoreTiming::Shutdown();
44 Core::Shutdown(); 52 Core::Shutdown();
53
54 is_powered_on = false;
45} 55}
46 56
47} // namespace 57} // namespace