diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-06 08:00:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 08:00:43 +0100 |
commit | 1498a7c9a84037d7c78ff21b3bc996622269db43 (patch) | |
tree | 0fb418f721db6e307fb7105cc57fe3a2eec7d0bf /src/core/hle/service/vi/display/vi_display.cpp | |
parent | Merge pull request #5875 from lioncash/identifier (diff) | |
parent | hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. (diff) | |
download | yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.gz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.bz2 yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.lz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.xz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.zst yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.zip |
Diffstat (limited to 'src/core/hle/service/vi/display/vi_display.cpp')
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.cpp | 14 |
1 files changed, 8 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 5a202ac81..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/readable_event.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::WritableEvent::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; @@ -31,12 +33,12 @@ const Layer& Display::GetLayer(std::size_t index) const { return *layers.at(index); } -std::shared_ptr<Kernel::ReadableEvent> Display::GetVSyncEvent() const { - return vsync_event.readable; +std::shared_ptr<Kernel::KReadableEvent> Display::GetVSyncEvent() const { + return vsync_event->GetReadableEvent(); } void Display::SignalVSyncEvent() { - vsync_event.writable->Signal(); + vsync_event->GetWritableEvent()->Signal(); } void Display::CreateLayer(u64 id, NVFlinger::BufferQueue& buffer_queue) { |