diff options
| author | 2023-11-13 19:01:05 -0500 | |
|---|---|---|
| committer | 2023-11-14 11:51:04 -0500 | |
| commit | ec6b67d862a2606d6e9fe1036746605a6bfe5114 (patch) | |
| tree | 860ee81c9d35939ecc2178fc5a1497ed5dadec1e /src/core/core_timing.cpp | |
| parent | Merge pull request #11990 from german77/audio (diff) | |
| download | yuzu-ec6b67d862a2606d6e9fe1036746605a6bfe5114.tar.gz yuzu-ec6b67d862a2606d6e9fe1036746605a6bfe5114.tar.xz yuzu-ec6b67d862a2606d6e9fe1036746605a6bfe5114.zip | |
core_timing: lock event queue access
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index e671b270f..d6b5abc68 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -76,6 +76,7 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | void CoreTiming::ClearPendingEvents() { | 78 | void CoreTiming::ClearPendingEvents() { |
| 79 | std::scoped_lock lock{basic_lock}; | ||
| 79 | event_queue.clear(); | 80 | event_queue.clear(); |
| 80 | } | 81 | } |
| 81 | 82 | ||
| @@ -113,6 +114,7 @@ bool CoreTiming::IsRunning() const { | |||
| 113 | } | 114 | } |
| 114 | 115 | ||
| 115 | bool CoreTiming::HasPendingEvents() const { | 116 | bool CoreTiming::HasPendingEvents() const { |
| 117 | std::scoped_lock lock{basic_lock}; | ||
| 116 | return !(wait_set && event_queue.empty()); | 118 | return !(wait_set && event_queue.empty()); |
| 117 | } | 119 | } |
| 118 | 120 | ||