diff options
| author | 2018-11-16 18:07:42 +1100 | |
|---|---|---|
| committer | 2018-11-16 18:07:42 +1100 | |
| commit | 9359655712e99d6e49129a0243cdeec4eac6b250 (patch) | |
| tree | 5a4df04e5b49ef01a3ffd867517d929693d3e577 /src | |
| parent | Fixed priority switching edge case for handheld (#1675) (diff) | |
| download | yuzu-9359655712e99d6e49129a0243cdeec4eac6b250.tar.gz yuzu-9359655712e99d6e49129a0243cdeec4eac6b250.tar.xz yuzu-9359655712e99d6e49129a0243cdeec4eac6b250.zip | |
Report resolution scaling support for vi and am
Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 30 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.ui | 94 |
3 files changed, 76 insertions, 60 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 0477ce66e..b7fe39bc9 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -471,11 +471,15 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& | |||
| 471 | rb.Push(RESULT_SUCCESS); | 471 | rb.Push(RESULT_SUCCESS); |
| 472 | 472 | ||
| 473 | if (Settings::values.use_docked_mode) { | 473 | if (Settings::values.use_docked_mode) { |
| 474 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 474 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) * |
| 475 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 475 | static_cast<u32>(Settings::values.resolution_factor)); |
| 476 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) * | ||
| 477 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 476 | } else { | 478 | } else { |
| 477 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth)); | 479 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) * |
| 478 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight)); | 480 | static_cast<u32>(Settings::values.resolution_factor)); |
| 481 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) * | ||
| 482 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 479 | } | 483 | } |
| 480 | 484 | ||
| 481 | LOG_DEBUG(Service_AM, "called"); | 485 | LOG_DEBUG(Service_AM, "called"); |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d764b2406..85c74c516 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -494,7 +494,9 @@ private: | |||
| 494 | 494 | ||
| 495 | if (transaction == TransactionId::Connect) { | 495 | if (transaction == TransactionId::Connect) { |
| 496 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; | 496 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; |
| 497 | IGBPConnectResponseParcel response{1280, 720}; | 497 | IGBPConnectResponseParcel response{ |
| 498 | static_cast<u32>(1280 * Settings::values.resolution_factor), | ||
| 499 | static_cast<u32>(720 * Settings::values.resolution_factor)}; | ||
| 498 | ctx.WriteBuffer(response.Serialize()); | 500 | ctx.WriteBuffer(response.Serialize()); |
| 499 | } else if (transaction == TransactionId::SetPreallocatedBuffer) { | 501 | } else if (transaction == TransactionId::SetPreallocatedBuffer) { |
| 500 | IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()}; | 502 | IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()}; |
| @@ -670,11 +672,15 @@ private: | |||
| 670 | rb.Push(RESULT_SUCCESS); | 672 | rb.Push(RESULT_SUCCESS); |
| 671 | 673 | ||
| 672 | if (Settings::values.use_docked_mode) { | 674 | if (Settings::values.use_docked_mode) { |
| 673 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 675 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) * |
| 674 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 676 | static_cast<u32>(Settings::values.resolution_factor)); |
| 677 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) * | ||
| 678 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 675 | } else { | 679 | } else { |
| 676 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth)); | 680 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) * |
| 677 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight)); | 681 | static_cast<u32>(Settings::values.resolution_factor)); |
| 682 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) * | ||
| 683 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 678 | } | 684 | } |
| 679 | 685 | ||
| 680 | rb.PushRaw<float>(60.0f); | 686 | rb.PushRaw<float>(60.0f); |
| @@ -879,11 +885,15 @@ private: | |||
| 879 | rb.Push(RESULT_SUCCESS); | 885 | rb.Push(RESULT_SUCCESS); |
| 880 | 886 | ||
| 881 | if (Settings::values.use_docked_mode) { | 887 | if (Settings::values.use_docked_mode) { |
| 882 | rb.Push(static_cast<u64>(DisplayResolution::DockedWidth)); | 888 | rb.Push(static_cast<u64>(DisplayResolution::DockedWidth) * |
| 883 | rb.Push(static_cast<u64>(DisplayResolution::DockedHeight)); | 889 | static_cast<u32>(Settings::values.resolution_factor)); |
| 890 | rb.Push(static_cast<u64>(DisplayResolution::DockedHeight) * | ||
| 891 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 884 | } else { | 892 | } else { |
| 885 | rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth)); | 893 | rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth) * |
| 886 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); | 894 | static_cast<u32>(Settings::values.resolution_factor)); |
| 895 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight) * | ||
| 896 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 887 | } | 897 | } |
| 888 | } | 898 | } |
| 889 | 899 | ||
| @@ -900,6 +910,8 @@ private: | |||
| 900 | void ListDisplays(Kernel::HLERequestContext& ctx) { | 910 | void ListDisplays(Kernel::HLERequestContext& ctx) { |
| 901 | IPC::RequestParser rp{ctx}; | 911 | IPC::RequestParser rp{ctx}; |
| 902 | DisplayInfo display_info; | 912 | DisplayInfo display_info; |
| 913 | display_info.width *= static_cast<u64>(Settings::values.resolution_factor); | ||
| 914 | display_info.height *= static_cast<u64>(Settings::values.resolution_factor); | ||
| 903 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); | 915 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); |
| 904 | IPC::ResponseBuilder rb{ctx, 4}; | 916 | IPC::ResponseBuilder rb{ctx, 4}; |
| 905 | rb.Push(RESULT_SUCCESS); | 917 | rb.Push(RESULT_SUCCESS); |
diff --git a/src/yuzu/configuration/configure_graphics.ui b/src/yuzu/configuration/configure_graphics.ui index 91fcad994..e278cdd05 100644 --- a/src/yuzu/configuration/configure_graphics.ui +++ b/src/yuzu/configuration/configure_graphics.ui | |||
| @@ -23,31 +23,31 @@ | |||
| 23 | </property> | 23 | </property> |
| 24 | <layout class="QVBoxLayout" name="verticalLayout_2"> | 24 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
| 25 | <item> | 25 | <item> |
| 26 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | 26 | <layout class="QHBoxLayout" name="horizontalLayout_2"> |
| 27 | <item> | 27 | <item> |
| 28 | <widget class="QCheckBox" name="toggle_frame_limit"> | 28 | <widget class="QCheckBox" name="toggle_frame_limit"> |
| 29 | <property name="text"> | 29 | <property name="text"> |
| 30 | <string>Limit Speed Percent</string> | 30 | <string>Limit Speed Percent</string> |
| 31 | </property> | 31 | </property> |
| 32 | </widget> | 32 | </widget> |
| 33 | </item> | 33 | </item> |
| 34 | <item> | 34 | <item> |
| 35 | <widget class="QSpinBox" name="frame_limit"> | 35 | <widget class="QSpinBox" name="frame_limit"> |
| 36 | <property name="suffix"> | 36 | <property name="suffix"> |
| 37 | <string>%</string> | 37 | <string>%</string> |
| 38 | </property> | 38 | </property> |
| 39 | <property name="minimum"> | 39 | <property name="minimum"> |
| 40 | <number>1</number> | 40 | <number>1</number> |
| 41 | </property> | 41 | </property> |
| 42 | <property name="maximum"> | 42 | <property name="maximum"> |
| 43 | <number>9999</number> | 43 | <number>9999</number> |
| 44 | </property> | 44 | </property> |
| 45 | <property name="value"> | 45 | <property name="value"> |
| 46 | <number>100</number> | 46 | <number>100</number> |
| 47 | </property> | 47 | </property> |
| 48 | </widget> | 48 | </widget> |
| 49 | </item> | 49 | </item> |
| 50 | </layout> | 50 | </layout> |
| 51 | </item> | 51 | </item> |
| 52 | <item> | 52 | <item> |
| 53 | <widget class="QCheckBox" name="use_accurate_gpu_emulation"> | 53 | <widget class="QCheckBox" name="use_accurate_gpu_emulation"> |
| @@ -61,7 +61,7 @@ | |||
| 61 | <item> | 61 | <item> |
| 62 | <widget class="QLabel" name="label"> | 62 | <widget class="QLabel" name="label"> |
| 63 | <property name="text"> | 63 | <property name="text"> |
| 64 | <string>Internal Resolution:(Currently does nothing.)</string> | 64 | <string>Internal Resolution</string> |
| 65 | </property> | 65 | </property> |
| 66 | </widget> | 66 | </widget> |
| 67 | </item> | 67 | </item> |
| @@ -96,27 +96,27 @@ | |||
| 96 | </item> | 96 | </item> |
| 97 | </layout> | 97 | </layout> |
| 98 | </item> | 98 | </item> |
| 99 | <item> | 99 | <item> |
| 100 | <layout class="QHBoxLayout" name="horizontalLayout_6"> | 100 | <layout class="QHBoxLayout" name="horizontalLayout_6"> |
| 101 | <item> | 101 | <item> |
| 102 | <widget class="QLabel" name="bg_label"> | 102 | <widget class="QLabel" name="bg_label"> |
| 103 | <property name="text"> | 103 | <property name="text"> |
| 104 | <string>Background Color:</string> | 104 | <string>Background Color:</string> |
| 105 | </property> | 105 | </property> |
| 106 | </widget> | 106 | </widget> |
| 107 | </item> | 107 | </item> |
| 108 | <item> | 108 | <item> |
| 109 | <widget class="QPushButton" name="bg_button"> | 109 | <widget class="QPushButton" name="bg_button"> |
| 110 | <property name="maximumSize"> | 110 | <property name="maximumSize"> |
| 111 | <size> | 111 | <size> |
| 112 | <width>40</width> | 112 | <width>40</width> |
| 113 | <height>16777215</height> | 113 | <height>16777215</height> |
| 114 | </size> | 114 | </size> |
| 115 | </property> | 115 | </property> |
| 116 | </widget> | 116 | </widget> |
| 117 | </item> | 117 | </item> |
| 118 | </layout> | 118 | </layout> |
| 119 | </item> | 119 | </item> |
| 120 | </layout> | 120 | </layout> |
| 121 | </widget> | 121 | </widget> |
| 122 | </item> | 122 | </item> |