diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-09-25 22:08:33 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-05 01:59:47 +0200 |
commit | 4e9f975935b4208b29e158dabe62f8ad1122a447 (patch) | |
tree | 3b5df597b902d32d52853f1dbd49db2c8dafdf87 /src/core/hle/service/nvflinger | |
parent | Merge pull request #2941 from FernandoS27/fix-master (diff) | |
download | yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar.gz yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar.bz2 yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar.lz yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar.xz yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.tar.zst yuzu-4e9f975935b4208b29e158dabe62f8ad1122a447.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 2e4d707b9..3b251f8c8 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -170,8 +170,13 @@ const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const { void NVFlinger::Compose() { for (auto& display : displays) { + bool trigger_event = false; // Trigger vsync for this display at the end of drawing - SCOPE_EXIT({ display.SignalVSyncEvent(); }); + SCOPE_EXIT({ + if (trigger_event) { + display.SignalVSyncEvent(); + } + }); // Don't do anything for displays without layers. if (!display.HasLayers()) @@ -194,6 +199,7 @@ void NVFlinger::Compose() { } const auto& igbp_buffer = buffer->get().igbp_buffer; + trigger_event = true; // Now send the buffer to the GPU for drawing. // TODO(Subv): Support more than just disp0. The display device selection is probably based |