summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/vi/display')
-rw-r--r--src/core/hle/service/vi/display/vi_display.cpp13
-rw-r--r--src/core/hle/service/vi/display/vi_display.h12
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