diff options
| author | 2019-09-21 19:23:31 +1000 | |
|---|---|---|
| committer | 2019-09-22 16:35:51 +1000 | |
| commit | d6e830d8771e6ed1db8683385dc2d857d1ddca5c (patch) | |
| tree | e6b81ab9bc875fd31b67406144b20a98e8d3f15a /src | |
| parent | Rebase (diff) | |
| download | yuzu-d6e830d8771e6ed1db8683385dc2d857d1ddca5c.tar.gz yuzu-d6e830d8771e6ed1db8683385dc2d857d1ddca5c.tar.xz yuzu-d6e830d8771e6ed1db8683385dc2d857d1ddca5c.zip | |
Deglobalize System: NvFlinger
Diffstat (limited to 'src')
| -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 { | |||
| 29 | constexpr s64 frame_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 60); | 29 | constexpr s64 frame_ticks = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 60); |
| 30 | constexpr s64 frame_ticks_30fps = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 30); | 30 | constexpr s64 frame_ticks_30fps = static_cast<s64>(Core::Timing::BASE_CLOCK_RATE / 30); |
| 31 | 31 | ||
| 32 | NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_timing} { | 32 | NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing, Core::System& system) |
| 33 | : core_timing{core_timing}, system(system) { | ||
| 33 | displays.emplace_back(0, "Default"); | 34 | displays.emplace_back(0, "Default"); |
| 34 | displays.emplace_back(1, "External"); | 35 | displays.emplace_back(1, "External"); |
| 35 | displays.emplace_back(2, "Edid"); | 36 | displays.emplace_back(2, "Edid"); |
| @@ -185,11 +186,9 @@ void NVFlinger::Compose() { | |||
| 185 | MicroProfileFlip(); | 186 | MicroProfileFlip(); |
| 186 | 187 | ||
| 187 | if (!buffer) { | 188 | if (!buffer) { |
| 188 | auto& system_instance = Core::System::GetInstance(); | ||
| 189 | |||
| 190 | // There was no queued buffer to draw, render previous frame | 189 | // There was no queued buffer to draw, render previous frame |
| 191 | system_instance.GetPerfStats().EndGameFrame(); | 190 | system.GetPerfStats().EndGameFrame(); |
| 192 | system_instance.GPU().SwapBuffers({}); | 191 | system.GPU().SwapBuffers({}); |
| 193 | continue; | 192 | continue; |
| 194 | } | 193 | } |
| 195 | 194 | ||
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; | |||
| 38 | 38 | ||
| 39 | class NVFlinger final { | 39 | class NVFlinger final { |
| 40 | public: | 40 | public: |
| 41 | explicit NVFlinger(Core::Timing::CoreTiming& core_timing); | 41 | explicit NVFlinger(Core::Timing::CoreTiming& core_timing, Core::System& system); |
| 42 | ~NVFlinger(); | 42 | ~NVFlinger(); |
| 43 | 43 | ||
| 44 | /// Sets the NVDrv module instance to use to send buffers to the GPU. | 44 | /// Sets the NVDrv module instance to use to send buffers to the GPU. |
| @@ -107,6 +107,8 @@ private: | |||
| 107 | 107 | ||
| 108 | /// Core timing instance for registering/unregistering the composition event. | 108 | /// Core timing instance for registering/unregistering the composition event. |
| 109 | Core::Timing::CoreTiming& core_timing; | 109 | Core::Timing::CoreTiming& core_timing; |
| 110 | |||
| 111 | Core::System& system; | ||
| 110 | }; | 112 | }; |
| 111 | 113 | ||
| 112 | } // namespace Service::NVFlinger | 114 | } // namespace Service::NVFlinger |