diff options
author | Lioncash <mathew1800@gmail.com> | 2019-01-30 05:30:22 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-01-30 17:11:32 +0100 |
commit | 1d11def9c46dc9c81af01bc55052b51e8028126e (patch) | |
tree | bfaee8bb24a1b4e7b73842803ee5a846a51749d7 /src/core/hle/service/nvflinger/nvflinger.cpp | |
parent | Merge pull request #2070 from ReinUsesLisp/cubearray-view (diff) | |
download | yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar.gz yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar.bz2 yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar.lz yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar.xz yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.tar.zst yuzu-1d11def9c46dc9c81af01bc55052b51e8028126e.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 6db2cce41..8e2e6b670 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -61,7 +61,7 @@ u64 NVFlinger::OpenDisplay(std::string_view name) { } u64 NVFlinger::CreateLayer(u64 display_id) { - auto& display = GetDisplay(display_id); + auto& display = FindDisplay(display_id); ASSERT_MSG(display.layers.empty(), "Only one layer is supported per display at the moment"); @@ -73,16 +73,16 @@ u64 NVFlinger::CreateLayer(u64 display_id) { return layer_id; } -u32 NVFlinger::GetBufferQueueId(u64 display_id, u64 layer_id) { - const auto& layer = GetLayer(display_id, layer_id); +u32 NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) { + const auto& layer = FindLayer(display_id, layer_id); return layer.buffer_queue->GetId(); } Kernel::SharedPtr<Kernel::ReadableEvent> NVFlinger::GetVsyncEvent(u64 display_id) { - return GetDisplay(display_id).vsync_event.readable; + return FindDisplay(display_id).vsync_event.readable; } -std::shared_ptr<BufferQueue> NVFlinger::GetBufferQueue(u32 id) const { +std::shared_ptr<BufferQueue> NVFlinger::FindBufferQueue(u32 id) const { const auto itr = std::find_if(buffer_queues.begin(), buffer_queues.end(), [&](const auto& queue) { return queue->GetId() == id; }); @@ -90,7 +90,7 @@ std::shared_ptr<BufferQueue> NVFlinger::GetBufferQueue(u32 id) const { return *itr; } -Display& NVFlinger::GetDisplay(u64 display_id) { +Display& NVFlinger::FindDisplay(u64 display_id) { const auto itr = std::find_if(displays.begin(), displays.end(), [&](const Display& display) { return display.id == display_id; }); @@ -98,8 +98,8 @@ Display& NVFlinger::GetDisplay(u64 display_id) { return *itr; } -Layer& NVFlinger::GetLayer(u64 display_id, u64 layer_id) { - auto& display = GetDisplay(display_id); +Layer& NVFlinger::FindLayer(u64 display_id, u64 layer_id) { + auto& display = FindDisplay(display_id); const auto itr = std::find_if(display.layers.begin(), display.layers.end(), [&](const Layer& layer) { return layer.id == layer_id; }); |