aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/nvflinger/nvflinger.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-27 10:47:02 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 11:35:18 -0400
commitcc3aa959265480e1990b10ee37ebf1c0ade3da64 (patch)
tree0188b3adeab5cb83362f296e6894d70b53cb86e0 /src/core/hle/service/nvflinger/nvflinger.cpp
parent3902067008abed4ca748e2f6d4ad582748f9ed52 (diff)
NVFlinger: Lock race condition between CPU, Host Timing, VSync.
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index aaf28995d..b97f71350 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -36,10 +36,12 @@ NVFlinger::NVFlinger(Core::System& system) : system(system) {
displays.emplace_back(2, "Edid", system);
displays.emplace_back(3, "Internal", system);
displays.emplace_back(4, "Null", system);
+ guard = std::make_shared<std::mutex>();
// Schedule the screen composition events
composition_event =
Core::Timing::CreateEvent("ScreenComposition", [this](u64 userdata, s64 ns_late) {
+ Lock();
Compose();
const auto ticks = GetNextTicks();
this->system.CoreTiming().ScheduleEvent(std::max<s64>(0LL, ticks - ns_late),