diff options
author | Liam <byteslice@airmail.cc> | 2024-01-18 04:03:40 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-18 04:03:40 +0100 |
commit | e4bbb24dcf9048ac23e6c12f2ab5af1e988af764 (patch) | |
tree | ef5c985bcc765c02da9e443140de55228ed4134d /src/core/hle/service/vi/vi.cpp | |
parent | nvnflinger: ensure display abandonment considers all layers and future layers (diff) | |
download | yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.gz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.bz2 yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.lz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.xz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.zst yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.zip |
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 39d5be90d..bfcc27ddc 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -719,7 +719,12 @@ private: return; } - nvnflinger.OpenLayer(layer_id); + if (!nvnflinger.OpenLayer(layer_id)) { + LOG_WARNING(Service_VI, "Tried to open layer which was already open"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultOperationFailed); + return; + } android::OutputParcel parcel; parcel.WriteInterface(NativeWindow{*buffer_queue_id}); @@ -737,7 +742,12 @@ private: LOG_DEBUG(Service_VI, "called. layer_id=0x{:016X}", layer_id); - nvnflinger.CloseLayer(layer_id); + if (!nvnflinger.CloseLayer(layer_id)) { + LOG_WARNING(Service_VI, "Tried to close layer which was not open"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultOperationFailed); + return; + } IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); |