diff options
| author | 2022-12-20 09:10:41 -0500 | |
|---|---|---|
| committer | 2022-12-20 09:10:41 -0500 | |
| commit | 1b11e0f0d3209603e67b26f3ef22f1d1a493bbdc (patch) | |
| tree | e5e99d292065c14dc92605070ee1086675c046a0 /src/core/core.cpp | |
| parent | Merge pull request #9482 from liamwhite/vkbump (diff) | |
| parent | qt: use _exit instead of exit on SIGINT (diff) | |
| download | yuzu-1b11e0f0d3209603e67b26f3ef22f1d1a493bbdc.tar.gz yuzu-1b11e0f0d3209603e67b26f3ef22f1d1a493bbdc.tar.xz yuzu-1b11e0f0d3209603e67b26f3ef22f1d1a493bbdc.zip | |
Merge pull request #9463 from liamwhite/manager-events
EmuThread: refactor
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 18 |
1 files changed, 6 insertions, 12 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 { |