Add cutscene aspect ratio option.

This commit is contained in:
Skyth 2025-01-12 16:50:05 +03:00
parent 07ec4af3ba
commit 617f52d2ed
4 changed files with 31 additions and 1 deletions

View file

@ -294,6 +294,22 @@ CONFIG_DEFINE_LOCALE(XboxColorCorrection)
{ ELanguage::English, { "Xbox Color Correction", "Use the warm tint from the Xbox version of the game." } }
};
CONFIG_DEFINE_LOCALE(CutsceneAspectRatio)
{
{ ELanguage::English, { "Cutscene Aspect Ratio", "" } }
};
CONFIG_DEFINE_ENUM_LOCALE(ECutsceneAspectRatio)
{
{
ELanguage::English,
{
{ ECutsceneAspectRatio::Original, { "ORIGINAL", "" } },
{ ECutsceneAspectRatio::Unlocked, { "UNLOCKED", "" } },
}
}
};
CONFIG_DEFINE_LOCALE(UIScaleMode)
{
{ ELanguage::English, { "UI Scale Mode", "Change how the UI scales to the display." } }

View file

@ -1050,7 +1050,7 @@ void ViewRingXMidAsmHook(PPCRegister& f1, PPCVRegister& v62)
PPC_FUNC_IMPL(__imp__sub_82B8AA40);
PPC_FUNC(sub_82B8AA40)
{
bool shouldDrawLetterbox = g_aspectRatio < WIDE_ASPECT_RATIO;
bool shouldDrawLetterbox = Config::CutsceneAspectRatio != ECutsceneAspectRatio::Unlocked && g_aspectRatio < WIDE_ASPECT_RATIO;
PPC_STORE_U8(ctx.r3.u32, shouldDrawLetterbox);
if (shouldDrawLetterbox)

View file

@ -917,6 +917,7 @@ static void DrawConfigOptions()
DrawConfigOption(rowCount++, yOffset, &Config::GITextureFiltering, true);
DrawConfigOption(rowCount++, yOffset, &Config::MotionBlur, true);
DrawConfigOption(rowCount++, yOffset, &Config::XboxColorCorrection, true);
DrawConfigOption(rowCount++, yOffset, &Config::CutsceneAspectRatio, true);
DrawConfigOption(rowCount++, yOffset, &Config::UIScaleMode, true);
break;

View file

@ -258,6 +258,18 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EMotionBlur)
{ "Enhanced", EMotionBlur::Enhanced }
};
enum class ECutsceneAspectRatio : uint32_t
{
Original,
Unlocked
};
CONFIG_DEFINE_ENUM_TEMPLATE(ECutsceneAspectRatio)
{
{ "Original", ECutsceneAspectRatio::Original },
{ "Unlocked", ECutsceneAspectRatio::Unlocked }
};
enum class EUIScaleMode : uint32_t
{
Edge,
@ -661,6 +673,7 @@ public:
CONFIG_DEFINE_ENUM("Video", EDepthOfFieldQuality, DepthOfFieldQuality, EDepthOfFieldQuality::Auto);
CONFIG_DEFINE_ENUM_LOCALISED("Video", EMotionBlur, MotionBlur, EMotionBlur::Original);
CONFIG_DEFINE_LOCALISED("Video", bool, XboxColorCorrection, false);
CONFIG_DEFINE_ENUM_LOCALISED("Video", ECutsceneAspectRatio, CutsceneAspectRatio, ECutsceneAspectRatio::Original);
CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIScaleMode, UIScaleMode, EUIScaleMode::Edge);
CONFIG_DEFINE_HIDDEN("Exports", bool, AllowCancellingUnleash, false);