diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-31 10:38:57 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-05 23:03:32 +0100 |
commit | ff3c7c068b926399513bf7328c22e224ab0b53d6 (patch) | |
tree | c2a5d9f80ecf551659daa410cc384b1792eff31d /src/core/hle/service/vi/display | |
parent | hle: kernel: Implement KEvent. (diff) | |
download | yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.gz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.bz2 yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.lz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.xz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.zst yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.zip |
Diffstat (limited to 'src/core/hle/service/vi/display')
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.h | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp index 02d5287a9..7f42aa4a0 100644 --- a/src/core/hle/service/vi/display/vi_display.cpp +++ b/src/core/hle/service/vi/display/vi_display.cpp @@ -9,7 +9,9 @@ #include "common/assert.h" #include "core/core.h" +#include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" +#include "core/hle/kernel/k_writable_event.h" #include "core/hle/service/vi/display/vi_display.h" #include "core/hle/service/vi/layer/vi_layer.h" @@ -17,8 +19,8 @@ namespace Service::VI { Display::Display(u64 id, std::string name, Core::System& system) : id{id}, name{std::move(name)} { auto& kernel = system.Kernel(); - vsync_event = - Kernel::KWritableEvent::CreateEventPair(kernel, fmt::format("Display VSync Event {}", id)); + vsync_event = Kernel::KEvent::Create(kernel, fmt::format("Display VSync Event {}", id)); + vsync_event->Initialize(); } Display::~Display() = default; @@ -32,11 +34,11 @@ const Layer& Display::GetLayer(std::size_t index) const { } std::shared_ptr<Kernel::KReadableEvent> Display::GetVSyncEvent() const { - return vsync_event.readable; + return vsync_event->GetReadableEvent(); } void Display::SignalVSyncEvent() { - vsync_event.writable->Signal(); + vsync_event->GetWritableEvent()->Signal(); } void Display::CreateLayer(u64 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 b576c9cf2..931c898f6 100644 --- a/src/core/hle/service/vi/display/vi_display.h +++ b/src/core/hle/service/vi/display/vi_display.h @@ -9,7 +9,10 @@ #include <vector> #include "common/common_types.h" -#include "core/hle/kernel/k_writable_event.h" + +namespace Kernel { +class KEvent; +} namespace Service::NVFlinger { class BufferQueue; @@ -99,7 +102,7 @@ private: std::string name; std::vector<std::shared_ptr<Layer>> layers; - Kernel::EventPair vsync_event; + std::shared_ptr<Kernel::KEvent> vsync_event; }; } // namespace Service::VI |