Move SysNoNiceFPS to CArg
This commit is contained in:
parent
63369b4dec
commit
23bb4c5826
|
@ -93,6 +93,7 @@ struct CArg : prohibit_void_ptr<CArg>
|
|||
#endif
|
||||
uint8_t DbgBpp;
|
||||
int8_t DbgVerbose;
|
||||
bool SysNoNiceFPS;
|
||||
int SysMaxFPS;
|
||||
std::string SysMissionDir;
|
||||
};
|
||||
|
@ -106,7 +107,6 @@ struct Arg : prohibit_void_ptr<Arg>
|
|||
std::string SysHogDir;
|
||||
std::string SysPilot;
|
||||
std::string SysRecordDemoNameTemplate;
|
||||
bool SysNoNiceFPS;
|
||||
bool SysUsePlayersDir;
|
||||
bool SysLowMem;
|
||||
bool SysAutoRecordDemo;
|
||||
|
|
|
@ -667,7 +667,7 @@ static void draw_automap(automap *am)
|
|||
am->t2 = timer_query();
|
||||
const auto vsync = CGameCfg.VSync;
|
||||
const auto bound = F1_0 / (vsync ? MAXIMUM_FPS : CGameArg.SysMaxFPS);
|
||||
const auto may_sleep = !GameArg.SysNoNiceFPS && !vsync;
|
||||
const auto may_sleep = !CGameArg.SysNoNiceFPS && !vsync;
|
||||
while (am->t2 - am->t1 < bound) // ogl is fast enough that the automap can read the input too fast and you start to turn really slow. So delay a bit (and free up some cpu :)
|
||||
{
|
||||
if (Game_mode & GM_MULTI)
|
||||
|
|
|
@ -471,7 +471,7 @@ void calc_frame_time()
|
|||
|
||||
const auto vsync = CGameCfg.VSync;
|
||||
const auto bound = f1_0 / (likely(vsync) ? MAXIMUM_FPS : CGameArg.SysMaxFPS);
|
||||
const auto may_sleep = !GameArg.SysNoNiceFPS && !vsync;
|
||||
const auto may_sleep = !CGameArg.SysNoNiceFPS && !vsync;
|
||||
for (;;)
|
||||
{
|
||||
const auto timer_value = timer_update();
|
||||
|
|
|
@ -198,7 +198,7 @@ static void ReadCmdArgs(Inilist &ini, Arglist &Args)
|
|||
if (!d_stricmp(p, "-help") || !d_stricmp(p, "-h") || !d_stricmp(p, "-?") || !d_stricmp(p, "?"))
|
||||
CGameArg.SysShowCmdHelp = true;
|
||||
else if (!d_stricmp(p, "-nonicefps"))
|
||||
GameArg.SysNoNiceFPS = 1;
|
||||
CGameArg.SysNoNiceFPS = true;
|
||||
else if (!d_stricmp(p, "-maxfps"))
|
||||
CGameArg.SysMaxFPS = arg_integer(pp, end);
|
||||
else if (!d_stricmp(p, "-hogdir"))
|
||||
|
|
Loading…
Reference in a new issue