mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Replace FPS literals with constants.
This commit is contained in:
parent
79ad4c2099
commit
d29a7a6917
4 changed files with 6 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ PPC_FUNC_IMPL(__imp__sub_822C1130);
|
|||
PPC_FUNC(sub_822C1130)
|
||||
{
|
||||
// Correct small delta time errors.
|
||||
if (Config::FPS >= 15 && Config::FPS < 240)
|
||||
if (Config::FPS >= FPS_MIN && Config::FPS < FPS_MAX)
|
||||
{
|
||||
double targetDeltaTime = 1.0 / Config::FPS;
|
||||
if (abs(ctx.f1.f64 - targetDeltaTime) < 0.00001)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static std::chrono::steady_clock::time_point g_next;
|
|||
|
||||
void ApplicationUpdateMidAsmHook()
|
||||
{
|
||||
if (Config::FPS >= 15 && Config::FPS < 240)
|
||||
if (Config::FPS >= FPS_MIN && Config::FPS < FPS_MAX)
|
||||
{
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
|
||||
|
|
|
|||
|
|
@ -850,7 +850,7 @@ static void DrawConfigOptions()
|
|||
DrawConfigOption(rowCount++, yOffset, &Config::ResolutionScale, true, nullptr, 0.25f, 1.0f, 2.0f);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::Fullscreen, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::VSync, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::FPS, true, nullptr, 15, 120, 240);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::FPS, true, nullptr, FPS_MIN, 120, FPS_MAX);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::Brightness, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::AntiAliasing, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::TransparencyAntiAliasing, Config::AntiAliasing != EAntiAliasing::None, &Localise("Options_Desc_NotAvailableMSAA"));
|
||||
|
|
|
|||
|
|
@ -169,6 +169,9 @@ CONFIG_DEFINE_ENUM_TEMPLATE(ETripleBuffering)
|
|||
{ "Off", ETripleBuffering::Off }
|
||||
};
|
||||
|
||||
static constexpr int32_t FPS_MIN = 15;
|
||||
static constexpr int32_t FPS_MAX = 240;
|
||||
|
||||
enum class EAntiAliasing : uint32_t
|
||||
{
|
||||
None = 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue