mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-26 20:53:41 +00:00
hle: nvdrv: nvdata: buffer_queue_producer: Minor cleanup.
This commit is contained in:
parent
241ecae867
commit
c9d28c30f0
1 changed files with 11 additions and 11 deletions
|
@ -642,34 +642,34 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) {
|
||||||
return Status::NoInit;
|
return Status::NoInit;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 value{};
|
u32 value{};
|
||||||
switch (what) {
|
switch (what) {
|
||||||
case NativeWindow::Width:
|
case NativeWindow::Width:
|
||||||
value = static_cast<s32>(core->default_width);
|
value = core->default_width;
|
||||||
break;
|
break;
|
||||||
case NativeWindow::Height:
|
case NativeWindow::Height:
|
||||||
value = static_cast<s32>(core->default_height);
|
value = core->default_height;
|
||||||
break;
|
break;
|
||||||
case NativeWindow::Format:
|
case NativeWindow::Format:
|
||||||
value = static_cast<s32>(core->default_buffer_format);
|
value = static_cast<u32>(core->default_buffer_format);
|
||||||
break;
|
break;
|
||||||
case NativeWindow::MinUndequeedBuffers:
|
case NativeWindow::MinUndequeedBuffers:
|
||||||
value = core->GetMinUndequeuedBufferCountLocked(false);
|
value = core->GetMinUndequeuedBufferCountLocked(false);
|
||||||
break;
|
break;
|
||||||
case NativeWindow::StickyTransform:
|
case NativeWindow::StickyTransform:
|
||||||
value = static_cast<s32>(sticky_transform);
|
value = sticky_transform;
|
||||||
break;
|
break;
|
||||||
case NativeWindow::ConsumerRunningBehind:
|
case NativeWindow::ConsumerRunningBehind:
|
||||||
value = (core->queue.size() > 1);
|
value = (core->queue.size() > 1);
|
||||||
break;
|
break;
|
||||||
case NativeWindow::ConsumerUsageBits:
|
case NativeWindow::ConsumerUsageBits:
|
||||||
value = static_cast<s32>(core->consumer_usage_bit);
|
value = core->consumer_usage_bit;
|
||||||
break;
|
break;
|
||||||
case NativeWindow::BufferAge:
|
case NativeWindow::BufferAge:
|
||||||
if (core->buffer_age > INT32_MAX) {
|
if (core->buffer_age > INT32_MAX) {
|
||||||
value = 0;
|
value = 0;
|
||||||
} else {
|
} else {
|
||||||
value = static_cast<s32>(core->buffer_age);
|
value = static_cast<u32>(core->buffer_age);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -679,7 +679,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) {
|
||||||
|
|
||||||
LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value);
|
LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value);
|
||||||
|
|
||||||
*out_value = value;
|
*out_value = static_cast<s32>(value);
|
||||||
|
|
||||||
return Status::NoError;
|
return Status::NoError;
|
||||||
}
|
}
|
||||||
|
@ -917,12 +917,12 @@ void BufferQueueProducer::Transact(Kernel::HLERequestContext& ctx, TransactionId
|
||||||
status = SetBufferCount(buffer_count);
|
status = SetBufferCount(buffer_count);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TransactionId::GetBufferHistory: {
|
case TransactionId::GetBufferHistory:
|
||||||
LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory");
|
LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory");
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
ASSERT_MSG(false, "Unimplemented");
|
ASSERT_MSG(false, "Unimplemented TransactionId {}", code);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
parcel_out.Write(status);
|
parcel_out.Write(status);
|
||||||
|
|
Loading…
Reference in a new issue