diff options
author | Liam <byteslice@airmail.cc> | 2023-12-10 18:32:44 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-12 18:14:23 +0100 |
commit | adc307961357243a67ed4400d18ec9979a0c55db (patch) | |
tree | c1a143b2be065e4a7cf7bd03918b77576c1e0507 /src/core/hle/service/vi/layer | |
parent | Merge pull request #12296 from liamwhite/client-session (diff) | |
download | yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar.gz yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar.bz2 yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar.lz yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar.xz yuzu-adc307961357243a67ed4400d18ec9979a0c55db.tar.zst yuzu-adc307961357243a67ed4400d18ec9979a0c55db.zip |
Diffstat (limited to 'src/core/hle/service/vi/layer')
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.h | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/layer/vi_layer.cpp b/src/core/hle/service/vi/layer/vi_layer.cpp index 9ae2e0e44..04e52a23b 100644 --- a/src/core/hle/service/vi/layer/vi_layer.cpp +++ b/src/core/hle/service/vi/layer/vi_layer.cpp @@ -8,8 +8,8 @@ namespace Service::VI { Layer::Layer(u64 layer_id_, u32 binder_id_, android::BufferQueueCore& core_, android::BufferQueueProducer& binder_, std::shared_ptr<android::BufferItemConsumer>&& consumer_) - : layer_id{layer_id_}, binder_id{binder_id_}, core{core_}, binder{binder_}, consumer{std::move( - consumer_)} {} + : layer_id{layer_id_}, binder_id{binder_id_}, core{core_}, binder{binder_}, + consumer{std::move(consumer_)}, open{false} {} Layer::~Layer() = default; diff --git a/src/core/hle/service/vi/layer/vi_layer.h b/src/core/hle/service/vi/layer/vi_layer.h index 8cf1b5275..295005e23 100644 --- a/src/core/hle/service/vi/layer/vi_layer.h +++ b/src/core/hle/service/vi/layer/vi_layer.h @@ -71,12 +71,25 @@ public: return core; } + bool IsOpen() const { + return open; + } + + void Close() { + open = false; + } + + void Open() { + open = true; + } + private: const u64 layer_id; const u32 binder_id; android::BufferQueueCore& core; android::BufferQueueProducer& binder; std::shared_ptr<android::BufferItemConsumer> consumer; + bool open; }; } // namespace Service::VI |