Settings: Remove less-frequently used AR options

You can easily set this via custom ratios, or match window now.
This commit is contained in:
Connor McLaughlin 2021-04-30 02:29:39 +10:00
parent 256f272768
commit 17a4712a3e
9 changed files with 21 additions and 150 deletions

View File

@ -48,16 +48,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -48,16 +48,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -48,16 +48,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -48,16 +48,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -48,16 +48,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -92,16 +92,8 @@
<item>Auto (Match Display)</item> <item>Auto (Match Display)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_display_aspect_ratio_values"> <string-array name="settings_display_aspect_ratio_values">
@ -109,16 +101,8 @@
<item>Auto (Match Window)</item> <item>Auto (Match Window)</item>
<item>4:3</item> <item>4:3</item>
<item>16:9</item> <item>16:9</item>
<item>16:10</item>
<item>19:9</item> <item>19:9</item>
<item>20:9</item> <item>20:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
<item>2:1 (VRAM 1:1)</item>
<item>1:1</item>
<item>PAR 1:1</item> <item>PAR 1:1</item>
</string-array> </string-array>
<string-array name="settings_gpu_texture_filter_names"> <string-array name="settings_gpu_texture_filter_names">

View File

@ -678,10 +678,6 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(3)) / s64(4)) + s64(REGS.OFX)); Sx = ((((s64(result) * s64(REGS.IR1)) * s64(3)) / s64(4)) + s64(REGS.OFX));
break; break;
case DisplayAspectRatio::R16_10:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(5)) / s64(6)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R19_9: case DisplayAspectRatio::R19_9:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(12)) / s64(19)) + s64(REGS.OFX)); Sx = ((((s64(result) * s64(REGS.IR1)) * s64(12)) / s64(19)) + s64(REGS.OFX));
break; break;
@ -690,34 +686,6 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(3)) / s64(5)) + s64(REGS.OFX)); Sx = ((((s64(result) * s64(REGS.IR1)) * s64(3)) / s64(5)) + s64(REGS.OFX));
break; break;
case DisplayAspectRatio::R21_9:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(9)) / s64(16)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R32_9:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(3)) / s64(8)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R8_7:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(7)) / s64(6)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R5_4:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(16)) / s64(15)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R3_2:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(8)) / s64(9)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R2_1:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(2)) / s64(3)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::R1_1:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(7)) / s64(6)) + s64(REGS.OFX));
break;
case DisplayAspectRatio::Custom: case DisplayAspectRatio::Custom:
case DisplayAspectRatio::MatchWindow: case DisplayAspectRatio::MatchWindow:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(s_custom_aspect_ratio_numerator)) / Sx = ((((s64(result) * s64(REGS.IR1)) * s64(s_custom_aspect_ratio_numerator)) /
@ -774,12 +742,13 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
switch (s_aspect_ratio) switch (s_aspect_ratio)
{ {
case DisplayAspectRatio::R16_9: case DisplayAspectRatio::MatchWindow:
precise_x = (precise_x * 3.0f) / 4.0f; case DisplayAspectRatio::Custom:
precise_x = precise_x * s_custom_aspect_ratio_f;
break; break;
case DisplayAspectRatio::R16_10: case DisplayAspectRatio::R16_9:
precise_x = (precise_x * 5.0f) / 6.0f; precise_x = (precise_x * 3.0f) / 4.0f;
break; break;
case DisplayAspectRatio::R19_9: case DisplayAspectRatio::R19_9:
@ -790,39 +759,6 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
precise_x = (precise_x * 3.0f) / 5.0f; precise_x = (precise_x * 3.0f) / 5.0f;
break; break;
case DisplayAspectRatio::R21_9:
precise_x = (precise_x * 9.0f) / 16.0f;
break;
case DisplayAspectRatio::R32_9:
precise_x = (precise_x * 3.0f) / 8.0f;
break;
case DisplayAspectRatio::R8_7:
precise_x = (precise_x * 7.0f) / 6.0f;
break;
case DisplayAspectRatio::R5_4:
precise_x = (precise_x * 16.0f) / 15.0f;
break;
case DisplayAspectRatio::R3_2:
precise_x = (precise_x * 8.0f) / 9.0f;
break;
case DisplayAspectRatio::R2_1:
precise_x = (precise_x * 2.0f) / 3.0f;
break;
case DisplayAspectRatio::R1_1:
precise_x = (precise_x * 7.0f) / 6.0f;
break;
case DisplayAspectRatio::MatchWindow:
case DisplayAspectRatio::Custom:
precise_x = precise_x * s_custom_aspect_ratio_f;
break;
case DisplayAspectRatio::Auto: case DisplayAspectRatio::Auto:
case DisplayAspectRatio::R4_3: case DisplayAspectRatio::R4_3:
case DisplayAspectRatio::PAR1_1: case DisplayAspectRatio::PAR1_1:

View File

@ -774,12 +774,11 @@ const char* Settings::GetDisplayCropModeDisplayName(DisplayCropMode crop_mode)
return s_display_crop_mode_display_names[static_cast<int>(crop_mode)]; return s_display_crop_mode_display_names[static_cast<int>(crop_mode)];
} }
static std::array<const char*, 16> s_display_aspect_ratio_names = { static std::array<const char*, static_cast<size_t>(DisplayAspectRatio::Count)> s_display_aspect_ratio_names = {
{TRANSLATABLE("DisplayAspectRatio", "Auto (Game Native)"), "Auto (Match Window)", "Custom", "4:3", "16:9", "16:10", {TRANSLATABLE("DisplayAspectRatio", "Auto (Game Native)"), "Auto (Match Window)", "Custom", "4:3", "16:9", "19:9",
"19:9", "20:9", "21:9", "32:9", "8:7", "5:4", "3:2", "2:1 (VRAM 1:1)", "1:1", "PAR 1:1"}}; "20:9", "PAR 1:1"}};
static constexpr std::array<float, 16> s_display_aspect_ratio_values = { static constexpr std::array<float, static_cast<size_t>(DisplayAspectRatio::Count)> s_display_aspect_ratio_values = {
{-1.0f, -1.0f, -1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 16.0f / 10.0f, 19.0f / 9.0f, 20.0f / 9.0f, 64.0f / 27.0f, {-1.0f, -1.0f, -1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 19.0f / 9.0f, 20.0f / 9.0f, -1.0f}};
32.0f / 9.0f, 8.0f / 7.0f, 5.0f / 4.0f, 3.0f / 2.0f, 2.0f / 1.0f, 1.0f, -1.0f}};
std::optional<DisplayAspectRatio> Settings::ParseDisplayAspectRatio(const char* str) std::optional<DisplayAspectRatio> Settings::ParseDisplayAspectRatio(const char* str)
{ {

View File

@ -98,16 +98,8 @@ enum class DisplayAspectRatio : u8
Custom, Custom,
R4_3, R4_3,
R16_9, R16_9,
R16_10,
R19_9, R19_9,
R20_9, R20_9,
R21_9,
R32_9,
R8_7,
R5_4,
R3_2,
R2_1,
R1_1,
PAR1_1, PAR1_1,
Count Count
}; };