diff options
author | Liam <byteslice@airmail.cc> | 2024-01-07 05:58:04 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-08 03:47:41 +0100 |
commit | ea710e652398f0646aeb1a1cdf78cee9691440e8 (patch) | |
tree | c2f6495907b42ade4416c51c2781734d4a3e4313 /src/core/hle/service/vi/display | |
parent | vi: fix name of nvnflinger (diff) | |
download | yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar.gz yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar.bz2 yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar.lz yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar.xz yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.tar.zst yuzu-ea710e652398f0646aeb1a1cdf78cee9691440e8.zip |
Diffstat (limited to 'src/core/hle/service/vi/display')
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.h | 12 |
2 files changed, 2 insertions, 23 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp index 71ce9be50..e2d9cd98a 100644 --- a/src/core/hle/service/vi/display/vi_display.cpp +++ b/src/core/hle/service/vi/display/vi_display.cpp @@ -71,18 +71,7 @@ size_t Display::GetNumLayers() const { return std::ranges::count_if(layers, [](auto& l) { return l->IsOpen(); }); } -Result Display::GetVSyncEvent(Kernel::KReadableEvent** out_vsync_event) { - if (got_vsync_event) { - return ResultPermissionDenied; - } - - got_vsync_event = true; - - *out_vsync_event = GetVSyncEventUnchecked(); - return ResultSuccess; -} - -Kernel::KReadableEvent* Display::GetVSyncEventUnchecked() { +Kernel::KReadableEvent* Display::GetVSyncEvent() { return &vsync_event->GetReadableEvent(); } diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h index 1d9360b96..7e68ee79b 100644 --- a/src/core/hle/service/vi/display/vi_display.h +++ b/src/core/hle/service/vi/display/vi_display.h @@ -74,16 +74,8 @@ public: std::size_t GetNumLayers() const; - /** - * Gets the internal vsync event. - * - * @returns The internal Vsync event if it has not yet been retrieved, - * VI::ResultPermissionDenied otherwise. - */ - [[nodiscard]] Result GetVSyncEvent(Kernel::KReadableEvent** out_vsync_event); - /// Gets the internal vsync event. - Kernel::KReadableEvent* GetVSyncEventUnchecked(); + Kernel::KReadableEvent* GetVSyncEvent(); /// Signals the internal vsync event. void SignalVSyncEvent(); @@ -104,7 +96,6 @@ public: /// Resets the display for a new connection. void Reset() { layers.clear(); - got_vsync_event = false; } /// Attempts to find a layer with the given ID. @@ -133,7 +124,6 @@ private: std::vector<std::unique_ptr<Layer>> layers; Kernel::KEvent* vsync_event{}; - bool got_vsync_event{false}; }; } // namespace Service::VI |