diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-18 22:58:29 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-05 21:49:31 +0200 |
commit | b391e5f6386eecf6170b544245e3e4e31427913c (patch) | |
tree | 8a6cb553577e6f0e5f059d212fecee9e32fdc08d /src/core/hle/service/nvflinger/nvflinger.cpp | |
parent | NVServices: Make NVEvents Automatic according to documentation. (diff) | |
download | yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.gz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.bz2 yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.lz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.xz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.zst yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index a7937b490..70441f6a2 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -37,14 +37,14 @@ NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_t displays.emplace_back(4, "Null"); // Schedule the screen composition events - //const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : frame_ticks; - - composition_event = core_timing.RegisterEvent( - "ScreenComposition", [this](u64 userdata, s64 cycles_late) { - Compose(); - const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : GetNextTicks(); - this->core_timing.ScheduleEvent(std::max(0LL,ticks - cycles_late), composition_event); - }); + // const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : frame_ticks; + + composition_event = core_timing.RegisterEvent("ScreenComposition", [this](u64 userdata, + s64 cycles_late) { + Compose(); + const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : GetNextTicks(); + this->core_timing.ScheduleEvent(std::max<s64>(0LL, ticks - cycles_late), composition_event); + }); core_timing.ScheduleEvent(frame_ticks, composition_event); } |