diff options
| author | 2023-04-22 23:58:27 -0400 | |
|---|---|---|
| committer | 2023-06-07 21:44:42 -0400 | |
| commit | bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e (patch) | |
| tree | d34669136f2d05a196fc583c250eae3a54dc95aa | |
| parent | (wall, native)_clock: Rework NativeClock (diff) | |
| download | yuzu-bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e.tar.gz yuzu-bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e.tar.xz yuzu-bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e.zip | |
nvnflinger: Acquire lock prior to signaling the vsync variable
| -rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index 4988e6e17..aa3356611 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp | |||
| @@ -70,7 +70,8 @@ Nvnflinger::Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_ | |||
| 70 | [this](std::uintptr_t, s64 time, | 70 | [this](std::uintptr_t, s64 time, |
| 71 | std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { | 71 | std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { |
| 72 | vsync_signal.store(true); | 72 | vsync_signal.store(true); |
| 73 | vsync_signal.notify_all(); | 73 | { const auto lock_guard = Lock(); } |
| 74 | vsync_signal.notify_one(); | ||
| 74 | return std::chrono::nanoseconds(GetNextTicks()); | 75 | return std::chrono::nanoseconds(GetNextTicks()); |
| 75 | }); | 76 | }); |
| 76 | 77 | ||