summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/nvflinger.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-02 12:02:59 +0200
committerGitHub <noreply@github.com>2022-10-02 12:02:59 +0200
commit80a3a731237472d8d2141243ca322ccf3276483c (patch)
treeeafea51bbdb8d7ceb9e69cd2d9b1156f1f3c3b9b /src/core/hle/service/nvflinger/nvflinger.cpp
parentMerge pull request #6598 from FernandoS27/falklands-are-british (diff)
parentservice: vi: Retrieve vsync event once per display (diff)
downloadyuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar.gz
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar.bz2
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar.lz
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar.xz
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.tar.zst
yuzu-80a3a731237472d8d2141243ca322ccf3276483c.zip
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 9b382bf56..93057e800 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -22,6 +22,7 @@
#include "core/hle/service/nvflinger/ui/graphic_buffer.h"
#include "core/hle/service/vi/display/vi_display.h"
#include "core/hle/service/vi/layer/vi_layer.h"
+#include "core/hle/service/vi/vi_results.h"
#include "video_core/gpu.h"
namespace Service::NVFlinger {
@@ -163,15 +164,15 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) {
return layer->GetBinderId();
}
-Kernel::KReadableEvent* NVFlinger::FindVsyncEvent(u64 display_id) {
+ResultVal<Kernel::KReadableEvent*> NVFlinger::FindVsyncEvent(u64 display_id) {
const auto lock_guard = Lock();
auto* const display = FindDisplay(display_id);
if (display == nullptr) {
- return nullptr;
+ return VI::ResultNotFound;
}
- return &display->GetVSyncEvent();
+ return display->GetVSyncEvent();
}
VI::Display* NVFlinger::FindDisplay(u64 display_id) {