diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-02-21 10:56:20 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-02-21 12:13:09 -0500 |
| commit | fd15730767860659bdb58e8cd33074530a708295 (patch) | |
| tree | b5225c8d0e1f8e60e373b7affb01c3d2e8f35ccc /src/core/hle/service/vi/display | |
| parent | fa4dc2cf427ddb464d73d532ba941513828b9b7a (diff) | |
service/vi/vi_layer: Convert Layer struct into a class
Like the previous changes made to the Display struct, this prepares the
Layer struct for changes to its interface. Given Layer will be given
more invariants in the future, we convert it into a class to better
signify that.
Diffstat (limited to 'src/core/hle/service/vi/display')
| -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 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp index 4d77c3353..9c0afd152 100644 --- a/src/core/hle/service/vi/display/vi_display.cpp +++ b/src/core/hle/service/vi/display/vi_display.cpp @@ -48,7 +48,7 @@ void Display::CreateLayer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> buffer Layer* Display::FindLayer(u64 id) { const auto itr = std::find_if(layers.begin(), layers.end(), - [id](const VI::Layer& layer) { return layer.id == id; }); + [id](const VI::Layer& layer) { return layer.GetID() == id; }); if (itr == layers.end()) { return nullptr; @@ -59,7 +59,7 @@ Layer* Display::FindLayer(u64 id) { const Layer* Display::FindLayer(u64 id) const { const auto itr = std::find_if(layers.begin(), layers.end(), - [id](const VI::Layer& layer) { return layer.id == id; }); + [id](const VI::Layer& layer) { return layer.GetID() == id; }); if (itr == layers.end()) { return nullptr; diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h index 22b831592..8948102bc 100644 --- a/src/core/hle/service/vi/display/vi_display.h +++ b/src/core/hle/service/vi/display/vi_display.h @@ -16,7 +16,7 @@ class BufferQueue; namespace Service::VI { -struct Layer; +class Layer; /// Represents a single display type class Display { |
