Use proper 21:9 aspect ratio, add 32:9

This commit is contained in:
Margen67 2020-12-19 12:44:50 -08:00
parent 6224d0ab89
commit b7534015e0
8 changed files with 21 additions and 6 deletions

View File

@ -50,6 +50,7 @@
<item>16:10</item>
<item>19:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>

View File

@ -50,6 +50,7 @@
<item>16:10</item>
<item>19:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>

View File

@ -50,6 +50,7 @@
<item>16:10</item>
<item>19:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>

View File

@ -94,6 +94,7 @@
<item>16:10</item>
<item>19:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>
@ -108,6 +109,7 @@
<item>16:10</item>
<item>19:9</item>
<item>21:9</item>
<item>32:9</item>
<item>8:7</item>
<item>5:4</item>
<item>3:2</item>

View File

@ -632,7 +632,11 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
break;
case DisplayAspectRatio::R21_9:
Sx = ((((s64(result) * s64(REGS.IR1)) * s64(4)) / s64(7)) + s64(REGS.OFX));
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:
@ -725,7 +729,11 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last)
break;
case DisplayAspectRatio::R21_9:
precise_x = (precise_x * 4.0f) / 7.0f;
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:

View File

@ -625,11 +625,11 @@ const char* Settings::GetDisplayCropModeDisplayName(DisplayCropMode crop_mode)
return s_display_crop_mode_display_names[static_cast<int>(crop_mode)];
}
static std::array<const char*, 12> s_display_aspect_ratio_names = {{"Auto (Game Native)", "4:3", "16:9", "16:10",
"19:9", "21:9", "8:7", "5:4", "3:2",
static std::array<const char*, 13> s_display_aspect_ratio_names = {{"Auto (Game Native)", "4:3", "16:9", "16:10",
"19:9", "21:9", "32:9", "8:7", "5:4", "3:2",
"2:1 (VRAM 1:1)", "1:1", "PAR 1:1"}};
static constexpr std::array<float, 12> s_display_aspect_ratio_values = {
{-1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 16.0f / 10.0f, 19.0f / 9.0f, 21.0f / 9.0f, 8.0f / 7.0f, 5.0f / 4.0f, 3.0f / 2.0f,
static constexpr std::array<float, 13> s_display_aspect_ratio_values = {
{-1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 16.0f / 10.0f, 19.0f / 9.0f, 64.0f / 27.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)

View File

@ -91,6 +91,7 @@ enum class DisplayAspectRatio : u8
R16_10,
R19_9,
R21_9,
R32_9,
R8_7,
R5_4,
R3_2,

View File

@ -710,6 +710,7 @@ static std::array<retro_core_option_definition, 49> s_option_definitions = {{
{"16:10", "16:10"},
{"19:9", "19:9"},
{"21:9", "21:9"},
{"32:9", "32:9"},
{"8:7", "8:7"},
{"5:4", "5:4"},
{"3:2", "3:2"},