mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 03:20:44 +00:00
Move vsync option to video setup
git-svn-id: https://svn.eduke32.com/eduke32@5475 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
971d5b6fac
commit
3b47e9d652
1 changed files with 19 additions and 14 deletions
|
@ -418,7 +418,7 @@ MAKE_MENU_TOP_ENTRYLINK( "Touch Setup", MEF_CenterMenu, OPTIONS_TOUCHSETUP, MENU
|
||||||
#endif
|
#endif
|
||||||
MAKE_MENU_TOP_ENTRYLINK( "Cheats", MEF_CenterMenu, OPTIONS_CHEATS, MENU_CHEATS );
|
MAKE_MENU_TOP_ENTRYLINK( "Cheats", MEF_CenterMenu, OPTIONS_CHEATS, MENU_CHEATS );
|
||||||
|
|
||||||
static int32_t newresolution, newrendermode, newfullscreen;
|
static int32_t newresolution, newrendermode, newfullscreen, newvsync;
|
||||||
|
|
||||||
enum resflags_t {
|
enum resflags_t {
|
||||||
RES_FS = 0x1,
|
RES_FS = 0x1,
|
||||||
|
@ -458,6 +458,14 @@ static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( "Renderer:", &MF_Red
|
||||||
|
|
||||||
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &newfullscreen );
|
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &newfullscreen );
|
||||||
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( "Fullscreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FULLSCREEN, Option );
|
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( "Fullscreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FULLSCREEN, Option );
|
||||||
|
|
||||||
|
|
||||||
|
static char *MEOSN_VIDEOSETUP_VSYNC [] ={ "Adaptive", "Off", "On", };
|
||||||
|
static int32_t MEOSV_VIDEOSETUP_VSYNC [] ={ -1, 0, 1, };
|
||||||
|
static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_VSYNC, MEOSV_VIDEOSETUP_VSYNC, 0x2);
|
||||||
|
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 MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
|
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link );
|
||||||
|
|
||||||
|
|
||||||
|
@ -494,11 +502,6 @@ static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 1, 2, 4, 8, 16, };
|
||||||
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY, 0x0 );
|
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY, 0x0 );
|
||||||
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
|
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
|
||||||
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY( "Anisotropy:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ANISOTROPY, Option );
|
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY( "Anisotropy:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ANISOTROPY, Option );
|
||||||
static char *MEOSN_DISPLAYSETUP_VSYNC[] = { "Adaptive", "Off", "On", };
|
|
||||||
static int32_t MEOSV_DISPLAYSETUP_VSYNC[] = { -1, 0, 1, };
|
|
||||||
static MenuOptionSet_t MEOS_DISPLAYSETUP_VSYNC = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_VSYNC, MEOSV_DISPLAYSETUP_VSYNC, 0x2 );
|
|
||||||
static MenuOption_t MEO_DISPLAYSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_VSYNC, &vsync);
|
|
||||||
static MenuEntry_t ME_DISPLAYSETUP_VSYNC = MAKE_MENUENTRY( "VSync:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VSYNC, Option );
|
|
||||||
|
|
||||||
#ifdef DROIDMENU
|
#ifdef DROIDMENU
|
||||||
static MenuOption_t MEO_DISPLAYSETUP_HIDEDPAD = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.hideStick);
|
static MenuOption_t MEO_DISPLAYSETUP_HIDEDPAD = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, &droidinput.hideStick);
|
||||||
|
@ -634,6 +637,7 @@ static MenuEntry_t *MEL_VIDEOSETUP[] = {
|
||||||
&ME_VIDEOSETUP_RENDERER,
|
&ME_VIDEOSETUP_RENDERER,
|
||||||
#endif
|
#endif
|
||||||
&ME_VIDEOSETUP_FULLSCREEN,
|
&ME_VIDEOSETUP_FULLSCREEN,
|
||||||
|
&ME_VIDEOSETUP_VSYNC,
|
||||||
&ME_Space6,
|
&ME_Space6,
|
||||||
&ME_VIDEOSETUP_APPLY,
|
&ME_VIDEOSETUP_APPLY,
|
||||||
};
|
};
|
||||||
|
@ -662,7 +666,6 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
|
||||||
#endif
|
#endif
|
||||||
#ifndef DROIDMENU
|
#ifndef DROIDMENU
|
||||||
&ME_DISPLAYSETUP_ANISOTROPY,
|
&ME_DISPLAYSETUP_ANISOTROPY,
|
||||||
&ME_DISPLAYSETUP_VSYNC,
|
|
||||||
&ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST,
|
&ME_DISPLAYSETUP_ADVANCED_GL_POLYMOST,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -678,7 +681,6 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
|
||||||
&ME_DISPLAYSETUP_TEXFILTER,
|
&ME_DISPLAYSETUP_TEXFILTER,
|
||||||
#ifndef DROIDMENU
|
#ifndef DROIDMENU
|
||||||
&ME_DISPLAYSETUP_ANISOTROPY,
|
&ME_DISPLAYSETUP_ANISOTROPY,
|
||||||
&ME_DISPLAYSETUP_VSYNC,
|
|
||||||
&ME_DISPLAYSETUP_ADVANCED_GL_POLYMER,
|
&ME_DISPLAYSETUP_ADVANCED_GL_POLYMER,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -1706,7 +1708,7 @@ static void M_PreMenu(MenuID_t cm)
|
||||||
|
|
||||||
MenuEntry_DisableOnCondition(&ME_VIDEOSETUP_APPLY,
|
MenuEntry_DisableOnCondition(&ME_VIDEOSETUP_APPLY,
|
||||||
(xdim == resolution[nr].xdim && ydim == resolution[nr].ydim &&
|
(xdim == resolution[nr].xdim && ydim == resolution[nr].ydim &&
|
||||||
getrendermode() == newrendermode && fullscreen == newfullscreen)
|
getrendermode() == newrendermode && fullscreen == newfullscreen && vsync == newvsync)
|
||||||
|| (newfullscreen ? !(resolution[nr].flags & RES_FS) : !(resolution[nr].flags & RES_WIN))
|
|| (newfullscreen ? !(resolution[nr].flags & RES_FS) : !(resolution[nr].flags & RES_WIN))
|
||||||
|| (newrendermode != REND_CLASSIC && resolution[nr].bppmax <= 8));
|
|| (newrendermode != REND_CLASSIC && resolution[nr].bppmax <= 8));
|
||||||
break;
|
break;
|
||||||
|
@ -2655,17 +2657,20 @@ static void M_MenuEntryLinkActivate(MenuEntry_t *entry)
|
||||||
|
|
||||||
if (entry == &ME_VIDEOSETUP_APPLY)
|
if (entry == &ME_VIDEOSETUP_APPLY)
|
||||||
{
|
{
|
||||||
int32_t pxdim, pydim, pfs, pbpp, prend;
|
int32_t pxdim, pydim, pfs, pbpp, prend, pvsync;
|
||||||
int32_t nxdim, nydim, nfs, nbpp, nrend;
|
int32_t nxdim, nydim, nfs, nbpp, nrend, nvsync;
|
||||||
|
|
||||||
pxdim = xdim;
|
pxdim = xdim;
|
||||||
pydim = ydim;
|
pydim = ydim;
|
||||||
pbpp = bpp;
|
pbpp = bpp;
|
||||||
pfs = fullscreen;
|
pfs = fullscreen;
|
||||||
|
pvsync = vsync;
|
||||||
prend = getrendermode();
|
prend = getrendermode();
|
||||||
nxdim = resolution[newresolution].xdim;
|
nxdim = resolution[newresolution].xdim;
|
||||||
nydim = resolution[newresolution].ydim;
|
nydim = resolution[newresolution].ydim;
|
||||||
nfs = newfullscreen;
|
nfs = newfullscreen;
|
||||||
|
nvsync = newvsync;
|
||||||
|
|
||||||
|
|
||||||
nbpp = (newrendermode == REND_CLASSIC) ? 8 : resolution[newresolution].bppmax;
|
nbpp = (newrendermode == REND_CLASSIC) ? 8 : resolution[newresolution].bppmax;
|
||||||
nrend = newrendermode;
|
nrend = newrendermode;
|
||||||
|
@ -2684,7 +2689,8 @@ static void M_MenuEntryLinkActivate(MenuEntry_t *entry)
|
||||||
g_restorePalette = -1;
|
g_restorePalette = -1;
|
||||||
G_UpdateScreenArea();
|
G_UpdateScreenArea();
|
||||||
setrendermode(nrend);
|
setrendermode(nrend);
|
||||||
|
setvsync(nvsync);
|
||||||
|
vsync = nvsync;
|
||||||
ud.config.ScreenMode = fullscreen;
|
ud.config.ScreenMode = fullscreen;
|
||||||
ud.config.ScreenWidth = xdim;
|
ud.config.ScreenWidth = xdim;
|
||||||
ud.config.ScreenHeight = ydim;
|
ud.config.ScreenHeight = ydim;
|
||||||
|
@ -2781,8 +2787,6 @@ static int32_t M_MenuEntryOptionModify(MenuEntry_t *entry, int32_t newOption)
|
||||||
pr_customaspect = MEOSV_DISPLAYSETUP_ASPECTRATIO_POLYMER[newOption];
|
pr_customaspect = MEOSV_DISPLAYSETUP_ASPECTRATIO_POLYMER[newOption];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (entry == &ME_DISPLAYSETUP_VSYNC)
|
|
||||||
setvsync(newOption);
|
|
||||||
#endif
|
#endif
|
||||||
else if (entry == &ME_SOUND)
|
else if (entry == &ME_SOUND)
|
||||||
{
|
{
|
||||||
|
@ -3556,6 +3560,7 @@ int M_ChangeMenu(MenuID_t cm)
|
||||||
}
|
}
|
||||||
newrendermode = getrendermode();
|
newrendermode = getrendermode();
|
||||||
newfullscreen = fullscreen;
|
newfullscreen = fullscreen;
|
||||||
|
newvsync = vsync;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ADVSOUND:
|
case MENU_ADVSOUND:
|
||||||
|
|
Loading…
Reference in a new issue