diff options
| author | 2022-03-19 23:15:13 -0700 | |
|---|---|---|
| committer | 2022-03-24 18:13:34 -0700 | |
| commit | c9d28c30f0a512d2a6fa1e6183d8a725d950881d (patch) | |
| tree | 4664006f9a9da4039739a958bab21ce4c38ec1d3 /src | |
| parent | hle: nvdrv: nvdata: Cleanup NvFence static assert. (diff) | |
| download | yuzu-c9d28c30f0a512d2a6fa1e6183d8a725d950881d.tar.gz yuzu-c9d28c30f0a512d2a6fa1e6183d8a725d950881d.tar.xz yuzu-c9d28c30f0a512d2a6fa1e6183d8a725d950881d.zip | |
hle: nvdrv: nvdata: buffer_queue_producer: Minor cleanup.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue_producer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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) { | |||
| 642 | return Status::NoInit; | 642 | return Status::NoInit; |
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | s32 value{}; | 645 | u32 value{}; |
| 646 | switch (what) { | 646 | switch (what) { |
| 647 | case NativeWindow::Width: | 647 | case NativeWindow::Width: |
| 648 | value = static_cast<s32>(core->default_width); | 648 | value = core->default_width; |
| 649 | break; | 649 | break; |
| 650 | case NativeWindow::Height: | 650 | case NativeWindow::Height: |
| 651 | value = static_cast<s32>(core->default_height); | 651 | value = core->default_height; |
| 652 | break; | 652 | break; |
| 653 | case NativeWindow::Format: | 653 | case NativeWindow::Format: |
| 654 | value = static_cast<s32>(core->default_buffer_format); | 654 | value = static_cast<u32>(core->default_buffer_format); |
| 655 | break; | 655 | break; |
| 656 | case NativeWindow::MinUndequeedBuffers: | 656 | case NativeWindow::MinUndequeedBuffers: |
| 657 | value = core->GetMinUndequeuedBufferCountLocked(false); | 657 | value = core->GetMinUndequeuedBufferCountLocked(false); |
| 658 | break; | 658 | break; |
| 659 | case NativeWindow::StickyTransform: | 659 | case NativeWindow::StickyTransform: |
| 660 | value = static_cast<s32>(sticky_transform); | 660 | value = sticky_transform; |
| 661 | break; | 661 | break; |
| 662 | case NativeWindow::ConsumerRunningBehind: | 662 | case NativeWindow::ConsumerRunningBehind: |
| 663 | value = (core->queue.size() > 1); | 663 | value = (core->queue.size() > 1); |
| 664 | break; | 664 | break; |
| 665 | case NativeWindow::ConsumerUsageBits: | 665 | case NativeWindow::ConsumerUsageBits: |
| 666 | value = static_cast<s32>(core->consumer_usage_bit); | 666 | value = core->consumer_usage_bit; |
| 667 | break; | 667 | break; |
| 668 | case NativeWindow::BufferAge: | 668 | case NativeWindow::BufferAge: |
| 669 | if (core->buffer_age > INT32_MAX) { | 669 | if (core->buffer_age > INT32_MAX) { |
| 670 | value = 0; | 670 | value = 0; |
| 671 | } else { | 671 | } else { |
| 672 | value = static_cast<s32>(core->buffer_age); | 672 | value = static_cast<u32>(core->buffer_age); |
| 673 | } | 673 | } |
| 674 | break; | 674 | break; |
| 675 | default: | 675 | default: |
| @@ -679,7 +679,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) { | |||
| 679 | 679 | ||
| 680 | LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value); | 680 | LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value); |
| 681 | 681 | ||
| 682 | *out_value = value; | 682 | *out_value = static_cast<s32>(value); |
| 683 | 683 | ||
| 684 | return Status::NoError; | 684 | return Status::NoError; |
| 685 | } | 685 | } |
| @@ -917,12 +917,12 @@ void BufferQueueProducer::Transact(Kernel::HLERequestContext& ctx, TransactionId | |||
| 917 | status = SetBufferCount(buffer_count); | 917 | status = SetBufferCount(buffer_count); |
| 918 | break; | 918 | break; |
| 919 | } | 919 | } |
| 920 | case TransactionId::GetBufferHistory: { | 920 | case TransactionId::GetBufferHistory: |
| 921 | LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory"); | 921 | LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory"); |
| 922 | break; | 922 | break; |
| 923 | } | ||
| 924 | default: | 923 | default: |
| 925 | ASSERT_MSG(false, "Unimplemented"); | 924 | ASSERT_MSG(false, "Unimplemented TransactionId {}", code); |
| 925 | break; | ||
| 926 | } | 926 | } |
| 927 | 927 | ||
| 928 | parcel_out.Write(status); | 928 | parcel_out.Write(status); |