diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core.cpp | 18 | ||||
| -rw-r--r-- | src/core/core.h | 4 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index a738f221f..47292cd78 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -183,26 +183,20 @@ struct System::Impl { | |||
| 183 | Initialize(system); | 183 | Initialize(system); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | SystemResultStatus Run() { | 186 | void Run() { |
| 187 | std::unique_lock<std::mutex> lk(suspend_guard); | 187 | std::unique_lock<std::mutex> lk(suspend_guard); |
| 188 | status = SystemResultStatus::Success; | ||
| 189 | 188 | ||
| 190 | kernel.Suspend(false); | 189 | kernel.Suspend(false); |
| 191 | core_timing.SyncPause(false); | 190 | core_timing.SyncPause(false); |
| 192 | is_paused.store(false, std::memory_order_relaxed); | 191 | is_paused.store(false, std::memory_order_relaxed); |
| 193 | |||
| 194 | return status; | ||
| 195 | } | 192 | } |
| 196 | 193 | ||
| 197 | SystemResultStatus Pause() { | 194 | void Pause() { |
| 198 | std::unique_lock<std::mutex> lk(suspend_guard); | 195 | std::unique_lock<std::mutex> lk(suspend_guard); |
| 199 | status = SystemResultStatus::Success; | ||
| 200 | 196 | ||
| 201 | core_timing.SyncPause(true); | 197 | core_timing.SyncPause(true); |
| 202 | kernel.Suspend(true); | 198 | kernel.Suspend(true); |
| 203 | is_paused.store(true, std::memory_order_relaxed); | 199 | is_paused.store(true, std::memory_order_relaxed); |
| 204 | |||
| 205 | return status; | ||
| 206 | } | 200 | } |
| 207 | 201 | ||
| 208 | bool IsPaused() const { | 202 | bool IsPaused() const { |
| @@ -553,12 +547,12 @@ void System::Initialize() { | |||
| 553 | impl->Initialize(*this); | 547 | impl->Initialize(*this); |
| 554 | } | 548 | } |
| 555 | 549 | ||
| 556 | SystemResultStatus System::Run() { | 550 | void System::Run() { |
| 557 | return impl->Run(); | 551 | impl->Run(); |
| 558 | } | 552 | } |
| 559 | 553 | ||
| 560 | SystemResultStatus System::Pause() { | 554 | void System::Pause() { |
| 561 | return impl->Pause(); | 555 | impl->Pause(); |
| 562 | } | 556 | } |
| 563 | 557 | ||
| 564 | bool System::IsPaused() const { | 558 | bool System::IsPaused() const { |
diff --git a/src/core/core.h b/src/core/core.h index 4ebedffd9..fb5cda2f5 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -152,13 +152,13 @@ public: | |||
| 152 | * Run the OS and Application | 152 | * Run the OS and Application |
| 153 | * This function will start emulation and run the relevant devices | 153 | * This function will start emulation and run the relevant devices |
| 154 | */ | 154 | */ |
| 155 | [[nodiscard]] SystemResultStatus Run(); | 155 | void Run(); |
| 156 | 156 | ||
| 157 | /** | 157 | /** |
| 158 | * Pause the OS and Application | 158 | * Pause the OS and Application |
| 159 | * This function will pause emulation and stop the relevant devices | 159 | * This function will pause emulation and stop the relevant devices |
| 160 | */ | 160 | */ |
| 161 | [[nodiscard]] SystemResultStatus Pause(); | 161 | void Pause(); |
| 162 | 162 | ||
| 163 | /// Check if the core is currently paused. | 163 | /// Check if the core is currently paused. |
| 164 | [[nodiscard]] bool IsPaused() const; | 164 | [[nodiscard]] bool IsPaused() const; |