diff options
| author | 2018-11-23 23:32:19 -0500 | |
|---|---|---|
| committer | 2018-11-23 23:32:19 -0500 | |
| commit | e65966bcfceafca3cc2ebb7eab41918db99ea265 (patch) | |
| tree | b616942a107069bb61987586d1c538b1e4b2a0c5 /src | |
| parent | Merge pull request #1747 from DarkLordZach/exefs-lfs (diff) | |
| parent | Removed hard coded values for width and height (diff) | |
| download | yuzu-e65966bcfceafca3cc2ebb7eab41918db99ea265.tar.gz yuzu-e65966bcfceafca3cc2ebb7eab41918db99ea265.tar.xz yuzu-e65966bcfceafca3cc2ebb7eab41918db99ea265.zip | |
Merge pull request #1708 from ogniK5377/res-scale
Report resolution scaling support for 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 | 32 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.ui | 94 |
3 files changed, 78 insertions, 60 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index f4127701f..4f17b52f9 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -483,11 +483,15 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& | |||
| 483 | rb.Push(RESULT_SUCCESS); | 483 | rb.Push(RESULT_SUCCESS); |
| 484 | 484 | ||
| 485 | if (Settings::values.use_docked_mode) { | 485 | if (Settings::values.use_docked_mode) { |
| 486 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 486 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) * |
| 487 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 487 | static_cast<u32>(Settings::values.resolution_factor)); |
| 488 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) * | ||
| 489 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 488 | } else { | 490 | } else { |
| 489 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth)); | 491 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) * |
| 490 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight)); | 492 | static_cast<u32>(Settings::values.resolution_factor)); |
| 493 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) * | ||
| 494 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 491 | } | 495 | } |
| 492 | 496 | ||
| 493 | LOG_DEBUG(Service_AM, "called"); | 497 | LOG_DEBUG(Service_AM, "called"); |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d25fdb1fe..a72416084 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -510,7 +510,11 @@ private: | |||
| 510 | 510 | ||
| 511 | if (transaction == TransactionId::Connect) { | 511 | if (transaction == TransactionId::Connect) { |
| 512 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; | 512 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; |
| 513 | IGBPConnectResponseParcel response{1280, 720}; | 513 | IGBPConnectResponseParcel response{ |
| 514 | static_cast<u32>(static_cast<u32>(DisplayResolution::UndockedWidth) * | ||
| 515 | Settings::values.resolution_factor), | ||
| 516 | static_cast<u32>(static_cast<u32>(DisplayResolution::UndockedHeight) * | ||
| 517 | Settings::values.resolution_factor)}; | ||
| 514 | ctx.WriteBuffer(response.Serialize()); | 518 | ctx.WriteBuffer(response.Serialize()); |
| 515 | } else if (transaction == TransactionId::SetPreallocatedBuffer) { | 519 | } else if (transaction == TransactionId::SetPreallocatedBuffer) { |
| 516 | IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()}; | 520 | IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()}; |
| @@ -692,11 +696,15 @@ private: | |||
| 692 | rb.Push(RESULT_SUCCESS); | 696 | rb.Push(RESULT_SUCCESS); |
| 693 | 697 | ||
| 694 | if (Settings::values.use_docked_mode) { | 698 | if (Settings::values.use_docked_mode) { |
| 695 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 699 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) * |
| 696 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 700 | static_cast<u32>(Settings::values.resolution_factor)); |
| 701 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) * | ||
| 702 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 697 | } else { | 703 | } else { |
| 698 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth)); | 704 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) * |
| 699 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight)); | 705 | static_cast<u32>(Settings::values.resolution_factor)); |
| 706 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) * | ||
| 707 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 700 | } | 708 | } |
| 701 | 709 | ||
| 702 | rb.PushRaw<float>(60.0f); | 710 | rb.PushRaw<float>(60.0f); |
| @@ -901,11 +909,15 @@ private: | |||
| 901 | rb.Push(RESULT_SUCCESS); | 909 | rb.Push(RESULT_SUCCESS); |
| 902 | 910 | ||
| 903 | if (Settings::values.use_docked_mode) { | 911 | if (Settings::values.use_docked_mode) { |
| 904 | rb.Push(static_cast<u64>(DisplayResolution::DockedWidth)); | 912 | rb.Push(static_cast<u64>(DisplayResolution::DockedWidth) * |
| 905 | rb.Push(static_cast<u64>(DisplayResolution::DockedHeight)); | 913 | static_cast<u32>(Settings::values.resolution_factor)); |
| 914 | rb.Push(static_cast<u64>(DisplayResolution::DockedHeight) * | ||
| 915 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 906 | } else { | 916 | } else { |
| 907 | rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth)); | 917 | rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth) * |
| 908 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); | 918 | static_cast<u32>(Settings::values.resolution_factor)); |
| 919 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight) * | ||
| 920 | static_cast<u32>(Settings::values.resolution_factor)); | ||
| 909 | } | 921 | } |
| 910 | } | 922 | } |
| 911 | 923 | ||
| @@ -922,6 +934,8 @@ private: | |||
| 922 | void ListDisplays(Kernel::HLERequestContext& ctx) { | 934 | void ListDisplays(Kernel::HLERequestContext& ctx) { |
| 923 | IPC::RequestParser rp{ctx}; | 935 | IPC::RequestParser rp{ctx}; |
| 924 | DisplayInfo display_info; | 936 | DisplayInfo display_info; |
| 937 | display_info.width *= static_cast<u64>(Settings::values.resolution_factor); | ||
| 938 | display_info.height *= static_cast<u64>(Settings::values.resolution_factor); | ||
| 925 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); | 939 | ctx.WriteBuffer(&display_info, sizeof(DisplayInfo)); |
| 926 | IPC::ResponseBuilder rb{ctx, 4}; | 940 | IPC::ResponseBuilder rb{ctx, 4}; |
| 927 | rb.Push(RESULT_SUCCESS); | 941 | 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> |