mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- set proper minimal FPS rate for all games.
This commit is contained in:
parent
e29eb5bbed
commit
76311cfcc9
2 changed files with 8 additions and 3 deletions
|
@ -72,11 +72,13 @@ CVAR(Int, win_w, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Int, win_h, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Int, win_h, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Bool, win_maximized, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CVAR(Bool, win_maximized, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
|
|
||||||
|
int MinFPSRate = 35;
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
if (self < GameTicRate && self != 0)
|
if (self < MinFPSRate && self != 0)
|
||||||
{
|
{
|
||||||
self = GameTicRate;
|
self = MinFPSRate;
|
||||||
}
|
}
|
||||||
else if (self > 1000)
|
else if (self > 1000)
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,10 +440,12 @@ namespace Powerslave
|
||||||
::GameInterface* CreateInterface();
|
::GameInterface* CreateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
CVAR(Bool, duke_compatibility_15, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR(Bool, duke_compatibility_15, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
extern int MinFPSRate; // this is a bit messy.
|
||||||
|
|
||||||
void CheckFrontend(int flags)
|
void CheckFrontend(int flags)
|
||||||
{
|
{
|
||||||
|
MinFPSRate = 30;
|
||||||
bool duke_compat = duke_compatibility_15;
|
bool duke_compat = duke_compatibility_15;
|
||||||
// This point is too early to have cmdline CVAR checkers working so it must be with a switch.
|
// This point is too early to have cmdline CVAR checkers working so it must be with a switch.
|
||||||
auto c = Args->CheckValue("-duke_compatibility_15");
|
auto c = Args->CheckValue("-duke_compatibility_15");
|
||||||
|
@ -462,6 +464,7 @@ void CheckFrontend(int flags)
|
||||||
}
|
}
|
||||||
else if (flags & GAMEFLAG_SW)
|
else if (flags & GAMEFLAG_SW)
|
||||||
{
|
{
|
||||||
|
MinFPSRate = 40;
|
||||||
gi = ShadowWarrior::CreateInterface();
|
gi = ShadowWarrior::CreateInterface();
|
||||||
}
|
}
|
||||||
else if (flags & GAMEFLAG_PSEXHUMED)
|
else if (flags & GAMEFLAG_PSEXHUMED)
|
||||||
|
|
Loading…
Reference in a new issue