diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp index 4317aee1c4..467e4cad60 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp @@ -744,6 +744,17 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) { return Status::NoError; } + if (core->connected_api == NativeWindowApi::NoConnectedApi) { + LOG_DEBUG(Service_Nvnflinger, "already disconnected (req = {})", api); + return Status::NoError; + } + + if (core->connected_api != api) { + LOG_WARNING(Service_Nvnflinger, + "Disconnect api mismatch (cur = {} req = {}) — forcing disconnect", + core->connected_api, api); + } + switch (api) { case NativeWindowApi::Egl: case NativeWindowApi::Cpu: @@ -770,8 +781,7 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) { } } - // Call back without lock held - if (listener != nullptr) { + if (listener) { listener->OnBuffersReleased(); } diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver.cpp b/src/core/hle/service/nvnflinger/hos_binder_driver.cpp index 8ef5d02c2e..d30aa3717d 100644 --- a/src/core/hle/service/nvnflinger/hos_binder_driver.cpp +++ b/src/core/hle/service/nvnflinger/hos_binder_driver.cpp @@ -40,7 +40,7 @@ Result IHOSBinderDriver::TransactParcel(s32 binder_id, u32 transaction_id, } Result IHOSBinderDriver::AdjustRefcount(s32 binder_id, s32 addval, s32 type) { - LOG_WARNING(Service_VI, "(STUBBED) called id={}, addval={}, type={}", binder_id, addval, type); + LOG_DEBUG(Service_VI, "called id={}, addval={}, type={}", binder_id, addval, type); R_UNLESS(type == 0 || type == 1, ResultUnknown); m_server->AdjustRefcount(binder_id, addval, type == 1); R_SUCCEED();