mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
GS: Add a 10:7 pixel ration option
This commit is contained in:
@@ -104,6 +104,11 @@
|
||||
<string>Widescreen (16:9)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Native (10:7)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
@@ -135,6 +140,11 @@
|
||||
<string>Widescreen (16:9)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Native (10:7)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
|
||||
@@ -196,6 +196,7 @@ enum class AspectRatioType : u8
|
||||
RAuto4_3_3_2,
|
||||
R4_3,
|
||||
R16_9,
|
||||
R10_7,
|
||||
MaxCount
|
||||
};
|
||||
|
||||
@@ -205,6 +206,7 @@ enum class FMVAspectRatioSwitchType : u8
|
||||
RAuto4_3_3_2,
|
||||
R4_3,
|
||||
R16_9,
|
||||
R10_7,
|
||||
MaxCount
|
||||
};
|
||||
|
||||
|
||||
@@ -469,6 +469,9 @@ static __fi void DoFMVSwitch()
|
||||
case FMVAspectRatioSwitchType::R16_9:
|
||||
EmuConfig.CurrentAspectRatio = new_fmv_state ? AspectRatioType::R16_9 : EmuConfig.GS.AspectRatio;
|
||||
break;
|
||||
case FMVAspectRatioSwitchType::R10_7:
|
||||
EmuConfig.CurrentAspectRatio = new_fmv_state ? AspectRatioType::R10_7 : EmuConfig.GS.AspectRatio;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ float GSRenderer::GetModXYOffset()
|
||||
|
||||
static float GetCurrentAspectRatioFloat(bool is_progressive)
|
||||
{
|
||||
static constexpr std::array<float, static_cast<size_t>(AspectRatioType::MaxCount) + 1> ars = {{4.0f / 3.0f, 4.0f / 3.0f, 4.0f / 3.0f, 16.0f / 9.0f, 3.0f / 2.0f}};
|
||||
static constexpr std::array<float, static_cast<size_t>(AspectRatioType::MaxCount) + 1> ars = {{4.0f / 3.0f, 4.0f / 3.0f, 4.0f / 3.0f, 16.0f / 9.0f, 10.0f / 7.0f, 3.0f / 2.0f}};
|
||||
return ars[static_cast<u32>(GSConfig.AspectRatio) + (3u * (is_progressive && GSConfig.AspectRatio == AspectRatioType::RAuto4_3_3_2))];
|
||||
}
|
||||
|
||||
@@ -300,7 +300,13 @@ static GSVector4 CalculateDrawDstRect(s32 window_width, s32 window_height, const
|
||||
targetAr = 4.0f / 3.0f;
|
||||
}
|
||||
else if (EmuConfig.CurrentAspectRatio == AspectRatioType::R16_9)
|
||||
{
|
||||
targetAr = 16.0f / 9.0f;
|
||||
}
|
||||
else if (EmuConfig.CurrentAspectRatio == AspectRatioType::R10_7)
|
||||
{
|
||||
targetAr = 10.0f / 7.0f;
|
||||
}
|
||||
|
||||
const float crop_adjust = (static_cast<float>(src_rect.width()) / static_cast<float>(src_size.x)) /
|
||||
(static_cast<float>(src_rect.height()) / static_cast<float>(src_size.y));
|
||||
|
||||
@@ -553,6 +553,7 @@ const char* Pcsx2Config::GSOptions::AspectRatioNames[] = {
|
||||
"Auto 4:3/3:2",
|
||||
"4:3",
|
||||
"16:9",
|
||||
"10:7",
|
||||
nullptr};
|
||||
|
||||
const char* Pcsx2Config::GSOptions::FMVAspectRatioSwitchNames[] = {
|
||||
@@ -560,6 +561,7 @@ const char* Pcsx2Config::GSOptions::FMVAspectRatioSwitchNames[] = {
|
||||
"Auto 4:3/3:2",
|
||||
"4:3",
|
||||
"16:9",
|
||||
"10:7",
|
||||
nullptr};
|
||||
|
||||
const char* Pcsx2Config::GSOptions::BlendingLevelNames[] = {
|
||||
|
||||
@@ -877,6 +877,9 @@ void VMManager::RequestDisplaySize(float scale /*= 0.0f*/)
|
||||
case AspectRatioType::R16_9:
|
||||
x_scale = (16.0f / 9.0f) / (static_cast<float>(iwidth) / static_cast<float>(iheight));
|
||||
break;
|
||||
case AspectRatioType::R10_7:
|
||||
x_scale = (10.0f / 7.0f) / (static_cast<float>(iwidth) / static_cast<float>(iheight));
|
||||
break;
|
||||
case AspectRatioType::Stretch:
|
||||
default:
|
||||
x_scale = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user