diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-10 11:34:26 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | 2e8d6fe9a0c07538397682e1cb25992bfd15676d (patch) | |
tree | 444ee462a197818e0114150a03c0a5898cadaa19 /src/core/hle/service/vi | |
parent | hle: ipc_helpers: Add methods for copy/move references. (diff) | |
download | yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.gz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.bz2 yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.lz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.xz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.zst yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.zip |
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 6 |
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) { |