mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Add menu option to control r_maxfps, default r_maxfps to 60, add cvar for pixel doubling (r_pixeldoubling).
git-svn-id: https://svn.eduke32.com/eduke32@5922 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b6b6d1e370
commit
1139c58e27
4 changed files with 16 additions and 3 deletions
|
@ -207,7 +207,7 @@ void CONFIG_SetDefaults(void)
|
|||
ud.crosshairscale = 50;
|
||||
ud.obituaries = 1;
|
||||
ud.democams = 1;
|
||||
ud.detail = 1;
|
||||
ud.detail = 0;
|
||||
ud.drawweapon = 1;
|
||||
ud.idplayers = 1;
|
||||
ud.levelstats = 0;
|
||||
|
|
|
@ -119,7 +119,7 @@ int32_t hud_showmapname = 1;
|
|||
|
||||
int32_t g_levelTextTime = 0;
|
||||
|
||||
int32_t r_maxfps = 0;
|
||||
int32_t r_maxfps = 60;
|
||||
uint32_t g_frameDelay = 0;
|
||||
|
||||
#if defined(RENDERTYPEWIN) && defined(USE_OPENGL)
|
||||
|
@ -886,7 +886,7 @@ void G_DrawRooms(int playerNum, int smoothRatio)
|
|||
#endif
|
||||
pPlayer->orotscrnang = pPlayer->rotscrnang;
|
||||
}
|
||||
else if (!ud.detail && getrendermode()==REND_CLASSIC)
|
||||
else if (ud.detail && getrendermode()==REND_CLASSIC)
|
||||
{
|
||||
pixelDoubling = 1;
|
||||
g_halveScreenArea = 1;
|
||||
|
|
|
@ -466,6 +466,13 @@ static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSET
|
|||
static MenuOption_t MEO_VIDEOSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_VSYNC, &newvsync);
|
||||
static MenuEntry_t ME_VIDEOSETUP_VSYNC = MAKE_MENUENTRY("VSync:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_VSYNC, Option);
|
||||
|
||||
static char const *MEOSN_VIDEOSETUP_FRAMELIMIT [] ={ "None", "30 fps", "60 fps", "120 fps", "144 fps", };
|
||||
static int32_t MEOSV_VIDEOSETUP_FRAMELIMIT [] ={ 0, 30, 60, 120, 144 };
|
||||
static MenuOptionSet_t MEOS_VIDEOSETUP_FRAMELIMIT = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_FRAMELIMIT, MEOSV_VIDEOSETUP_FRAMELIMIT, 0x2);
|
||||
static MenuOption_t MEO_VIDEOSETUP_FRAMELIMIT= MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_FRAMELIMIT, &r_maxfps);
|
||||
static MenuEntry_t ME_VIDEOSETUP_FRAMELIMIT = MAKE_MENUENTRY("Framerate limit:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMIT, Option);
|
||||
|
||||
|
||||
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
|
||||
|
||||
|
||||
|
@ -630,6 +637,7 @@ static MenuEntry_t *MEL_VIDEOSETUP[] = {
|
|||
#endif
|
||||
&ME_VIDEOSETUP_FULLSCREEN,
|
||||
&ME_VIDEOSETUP_VSYNC,
|
||||
&ME_VIDEOSETUP_FRAMELIMIT,
|
||||
&ME_Space6,
|
||||
&ME_VIDEOSETUP_APPLY,
|
||||
};
|
||||
|
@ -2871,6 +2879,10 @@ static int32_t M_MenuEntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (entry == &ME_VIDEOSETUP_FRAMELIMIT)
|
||||
{
|
||||
g_frameDelay = newOption ? Blrintf(1000.f/(float) newOption) : 0;
|
||||
}
|
||||
|
||||
switch (g_currentMenu)
|
||||
{
|
||||
|
|
|
@ -1614,6 +1614,7 @@ int32_t registerosdcommands(void)
|
|||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "r_pixeldoubling", "enable/disable pixel doubling in the software renderer", (void *) &ud.detail, CVAR_BOOL, 0, 1 },
|
||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
|
|
Loading…
Reference in a new issue