diff options
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index f9db79370..04adfc7d8 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -29,7 +29,8 @@ namespace Service::NVFlinger { constexpr s64 frame_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 60); constexpr s64 frame_ticks_30fps = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 30); -NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_timing} { +NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing, Core::System& system) + : core_timing{core_timing}, system(system) { displays.emplace_back(0, "Default"); displays.emplace_back(1, "External"); displays.emplace_back(2, "Edid"); @@ -185,11 +186,9 @@ void NVFlinger::Compose() { MicroProfileFlip(); if (!buffer) { - auto& system_instance = Core::System::GetInstance(); - // There was no queued buffer to draw, render previous frame - system_instance.GetPerfStats().EndGameFrame(); - system_instance.GPU().SwapBuffers({}); + system.GetPerfStats().EndGameFrame(); + system.GPU().SwapBuffers({}); continue; } diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index 988be8726..85aae725c 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -38,7 +38,7 @@ class BufferQueue; class NVFlinger final { public: - explicit NVFlinger(Core::Timing::CoreTiming& core_timing); + explicit NVFlinger(Core::Timing::CoreTiming& core_timing, Core::System& system); ~NVFlinger(); /// Sets the NVDrv module instance to use to send buffers to the GPU. @@ -107,6 +107,8 @@ private: /// Core timing instance for registering/unregistering the composition event. Core::Timing::CoreTiming& core_timing; + + Core::System& system; }; } // namespace Service::NVFlinger |