summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/vi/display/vi_display.cpp4
-rw-r--r--src/core/hle/service/vi/display/vi_display.h2
-rw-r--r--src/core/hle/service/vi/vi.cpp6
3 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp
index 7c52b6aa7..becbd36c1 100644
--- a/src/core/hle/service/vi/display/vi_display.cpp
+++ b/src/core/hle/service/vi/display/vi_display.cpp
@@ -33,12 +33,12 @@ const Layer& Display::GetLayer(std::size_t index) const {
return *layers.at(index);
}
-std::shared_ptr<Kernel::KReadableEvent> Display::GetVSyncEvent() const {
+Kernel::KReadableEvent& Display::GetVSyncEvent() {
return vsync_event.GetReadableEvent();
}
void Display::SignalVSyncEvent() {
- vsync_event.GetWritableEvent()->Signal();
+ vsync_event.GetWritableEvent().Signal();
}
void Display::CreateLayer(u64 layer_id, NVFlinger::BufferQueue& buffer_queue) {
diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h
index e990d6809..a09d982bc 100644
--- a/src/core/hle/service/vi/display/vi_display.h
+++ b/src/core/hle/service/vi/display/vi_display.h
@@ -59,7 +59,7 @@ public:
const Layer& GetLayer(std::size_t index) const;
/// Gets the readable vsync event.
- std::shared_ptr<Kernel::KReadableEvent> GetVSyncEvent() const;
+ Kernel::KReadableEvent& GetVSyncEvent();
/// Signals the internal vsync event.
void SignalVSyncEvent();
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 6e507bfb8..32e47a43e 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -669,12 +669,10 @@ private:
LOG_WARNING(Service_VI, "(STUBBED) called id={}, unknown={:08X}", id, unknown);
- const auto& buffer_queue = *nv_flinger.FindBufferQueue(id);
-
// TODO(Subv): Find out what this actually is.
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(buffer_queue.GetBufferWaitEvent().get());
+ rb.PushCopyObjects(nv_flinger.FindBufferQueue(id)->GetBufferWaitEvent());
}
NVFlinger::NVFlinger& nv_flinger;
@@ -1209,7 +1207,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(vsync_event.get());
+ rb.PushCopyObjects(vsync_event);
}
void ConvertScalingMode(Kernel::HLERequestContext& ctx) {