From c9d28c30f0a512d2a6fa1e6183d8a725d950881d Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 19 Mar 2022 23:15:13 -0700 Subject: hle: nvdrv: nvdata: buffer_queue_producer: Minor cleanup. --- .../service/nvflinger/buffer_queue_producer.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/core/hle/service/nvflinger') diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index 5ea48431f..078091904 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp @@ -642,34 +642,34 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) { return Status::NoInit; } - s32 value{}; + u32 value{}; switch (what) { case NativeWindow::Width: - value = static_cast(core->default_width); + value = core->default_width; break; case NativeWindow::Height: - value = static_cast(core->default_height); + value = core->default_height; break; case NativeWindow::Format: - value = static_cast(core->default_buffer_format); + value = static_cast(core->default_buffer_format); break; case NativeWindow::MinUndequeedBuffers: value = core->GetMinUndequeuedBufferCountLocked(false); break; case NativeWindow::StickyTransform: - value = static_cast(sticky_transform); + value = sticky_transform; break; case NativeWindow::ConsumerRunningBehind: value = (core->queue.size() > 1); break; case NativeWindow::ConsumerUsageBits: - value = static_cast(core->consumer_usage_bit); + value = core->consumer_usage_bit; break; case NativeWindow::BufferAge: if (core->buffer_age > INT32_MAX) { value = 0; } else { - value = static_cast(core->buffer_age); + value = static_cast(core->buffer_age); } break; default: @@ -679,7 +679,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) { LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value); - *out_value = value; + *out_value = static_cast(value); return Status::NoError; } @@ -917,12 +917,12 @@ void BufferQueueProducer::Transact(Kernel::HLERequestContext& ctx, TransactionId status = SetBufferCount(buffer_count); break; } - case TransactionId::GetBufferHistory: { + case TransactionId::GetBufferHistory: LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory"); break; - } default: - ASSERT_MSG(false, "Unimplemented"); + ASSERT_MSG(false, "Unimplemented TransactionId {}", code); + break; } parcel_out.Write(status); -- cgit v1.2.3