mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Merge f590788379
into e4c43ae3b1
This commit is contained in:
commit
29c5eb9ecb
5 changed files with 26 additions and 3 deletions
|
@ -3053,6 +3053,24 @@ void Video::ComputeViewportDimensions()
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
case EAspectRatio::Custom:
|
||||
{
|
||||
float customAspectRatio = Config::CustomAspectRatio;
|
||||
|
||||
if (aspectRatio > customAspectRatio)
|
||||
{
|
||||
s_viewportWidth = height * customAspectRatio;
|
||||
s_viewportHeight = height;
|
||||
}
|
||||
else
|
||||
{
|
||||
s_viewportWidth = width;
|
||||
s_viewportHeight = width * (1. / customAspectRatio);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
s_viewportWidth = width;
|
||||
|
|
|
@ -546,7 +546,8 @@ CONFIG_DEFINE_ENUM_LOCALE(EAspectRatio)
|
|||
{ EAspectRatio::Auto, { "AUTO", "Auto: the aspect ratio will dynamically adjust to the window size." } },
|
||||
{ EAspectRatio::Wide, { "16:9", "16:9: locks the game to a widescreen aspect ratio." } },
|
||||
{ EAspectRatio::Narrow, { "4:3", "4:3: locks the game to a narrow aspect ratio." } },
|
||||
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: locks the game to a narrow aspect ratio and retains parity with the game's original implementation." } }
|
||||
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: locks the game to a narrow aspect ratio and retains parity with the game's original implementation." } },
|
||||
{ EAspectRatio::Custom, { "Custom", "Custom:\nThe aspect ratio is set by using the CustomAspectRatio value in the config.toml file." } }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -564,7 +565,8 @@ CONFIG_DEFINE_ENUM_LOCALE(EAspectRatio)
|
|||
{ EAspectRatio::Auto, { "AUTO", "Auto: Das Seitenverhältnis passt sich automatisch der Fenstergröße an." } },
|
||||
{ EAspectRatio::Wide, { "16:9", "16:9: Stellt das Spiel in einem Breitbildschirm-Format dar." } },
|
||||
{ EAspectRatio::Narrow, { "4:3", "4:3: Stellt das Spiel in einem Mittel-Format dar." } },
|
||||
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: Stellt das Spiel in einem Mittel-Format dar, was der ursprünglichen Implementation originalgetreut bleibt." } }
|
||||
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: Stellt das Spiel in einem Mittel-Format dar, was der ursprünglichen Implementation originalgetreut bleibt." } },
|
||||
{ EAspectRatio::Custom, { "Benutzerdefiniert", "Benutzerdefiniert:\nDas Seitenverhältnis entspricht dem Wert CustomAspectRatio in der Datei config.toml." } }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -322,6 +322,7 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EAspectRatio)
|
|||
{ "16:9", EAspectRatio::Wide },
|
||||
{ "4:3", EAspectRatio::Narrow },
|
||||
{ "Original 4:3", EAspectRatio::OriginalNarrow },
|
||||
{ "Custom", EAspectRatio::Custom },
|
||||
};
|
||||
|
||||
CONFIG_DEFINE_ENUM_TEMPLATE(ETripleBuffering)
|
||||
|
|
|
@ -85,7 +85,8 @@ enum class EAspectRatio : uint32_t
|
|||
Auto,
|
||||
Wide,
|
||||
Narrow,
|
||||
OriginalNarrow
|
||||
OriginalNarrow,
|
||||
Custom
|
||||
};
|
||||
|
||||
enum class ETripleBuffering : uint32_t
|
||||
|
|
|
@ -56,6 +56,7 @@ CONFIG_DEFINE("Video", int32_t, WindowHeight, 720);
|
|||
CONFIG_DEFINE_ENUM("Video", EWindowState, WindowState, EWindowState::Normal);
|
||||
CONFIG_DEFINE_LOCALISED("Video", int32_t, Monitor, 0);
|
||||
CONFIG_DEFINE_ENUM_LOCALISED("Video", EAspectRatio, AspectRatio, EAspectRatio::Auto);
|
||||
CONFIG_DEFINE("Video", float, CustomAspectRatio, (16.0f / 9.0f));
|
||||
CONFIG_DEFINE_LOCALISED("Video", float, ResolutionScale, 1.0f);
|
||||
CONFIG_DEFINE_LOCALISED("Video", bool, Fullscreen, true);
|
||||
CONFIG_DEFINE_LOCALISED("Video", bool, VSync, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue