diff options
| author | 2020-02-25 12:28:55 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:10 -0400 | |
| commit | 18dcb0934217628711c5b1d22fd6d7635e683e3f (patch) | |
| tree | 426f78eb11aa79e0d1c7470b966fbae8ea8e3e6d /src/core/core_timing.cpp | |
| parent | AudioCore: Use nanoseconds instead of cycles for buffer time. (diff) | |
| download | yuzu-18dcb0934217628711c5b1d22fd6d7635e683e3f.tar.gz yuzu-18dcb0934217628711c5b1d22fd6d7635e683e3f.tar.xz yuzu-18dcb0934217628711c5b1d22fd6d7635e683e3f.zip | |
HostTiming: Pause the hardware clock on pause.
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index cc32a853b..5a7abcfca 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -77,6 +77,9 @@ void CoreTiming::SyncPause(bool is_paused) { | |||
| 77 | return; | 77 | return; |
| 78 | } | 78 | } |
| 79 | Pause(is_paused); | 79 | Pause(is_paused); |
| 80 | if (!is_paused) { | ||
| 81 | pause_event.Set(); | ||
| 82 | } | ||
| 80 | event.Set(); | 83 | event.Set(); |
| 81 | while (paused_set != is_paused) | 84 | while (paused_set != is_paused) |
| 82 | ; | 85 | ; |
| @@ -197,6 +200,9 @@ void CoreTiming::ThreadLoop() { | |||
| 197 | wait_set = false; | 200 | wait_set = false; |
| 198 | } | 201 | } |
| 199 | paused_set = true; | 202 | paused_set = true; |
| 203 | clock->Pause(true); | ||
| 204 | pause_event.Wait(); | ||
| 205 | clock->Pause(false); | ||
| 200 | } | 206 | } |
| 201 | } | 207 | } |
| 202 | 208 | ||