Fix USE_OPENGL=0 compiler errors introduced in r5475.

git-svn-id: https://svn.eduke32.com/eduke32@5515 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-01-08 01:32:41 +00:00
parent cd97e9fd3b
commit 855e9117ff

View file

@ -1706,7 +1706,11 @@ 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 && vsync == newvsync) getrendermode() == newrendermode && fullscreen == newfullscreen
#ifdef USE_OPENGL
&& vsync == newvsync
#endif
)
|| (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;
@ -2657,12 +2661,16 @@ static void M_MenuEntryLinkActivate(MenuEntry_t *entry)
{ {
resolution_t p ={ xdim, ydim, fullscreen, bpp, 0 }; resolution_t p ={ xdim, ydim, fullscreen, bpp, 0 };
int32_t prend = getrendermode(); int32_t prend = getrendermode();
#ifdef USE_OPENGL
int32_t pvsync = vsync; int32_t pvsync = vsync;
#endif
resolution_t n = { resolution[newresolution].xdim, resolution[newresolution].ydim, newfullscreen, resolution_t n = { resolution[newresolution].xdim, resolution[newresolution].ydim, newfullscreen,
(newrendermode == REND_CLASSIC) ? 8 : resolution[newresolution].bppmax, 0 }; (newrendermode == REND_CLASSIC) ? 8 : resolution[newresolution].bppmax, 0 };
int32_t nrend = newrendermode; int32_t nrend = newrendermode;
int32_t nvsync = newvsync;; #ifdef USE_OPENGL
int32_t nvsync = newvsync;
#endif
if (setgamemode(n.flags, n.xdim, n.ydim, n.bppmax) < 0) if (setgamemode(n.flags, n.xdim, n.ydim, n.bppmax) < 0)
{ {
@ -2674,8 +2682,10 @@ static void M_MenuEntryLinkActivate(MenuEntry_t *entry)
else else
{ {
onvideomodechange(p.bppmax > 8); onvideomodechange(p.bppmax > 8);
#ifdef USE_OPENGL
setvsync(pvsync); setvsync(pvsync);
vsync = pvsync; vsync = pvsync;
#endif
} }
} }
else onvideomodechange(n.bppmax > 8); else onvideomodechange(n.bppmax > 8);
@ -2683,8 +2693,10 @@ static void M_MenuEntryLinkActivate(MenuEntry_t *entry)
g_restorePalette = -1; g_restorePalette = -1;
G_UpdateScreenArea(); G_UpdateScreenArea();
setrendermode(nrend); setrendermode(nrend);
#ifdef USE_OPENGL
setvsync(nvsync); setvsync(nvsync);
vsync = nvsync; vsync = nvsync;
#endif
ud.config.ScreenMode = fullscreen; ud.config.ScreenMode = fullscreen;
ud.config.ScreenWidth = xdim; ud.config.ScreenWidth = xdim;
ud.config.ScreenHeight = ydim; ud.config.ScreenHeight = ydim;
@ -3554,7 +3566,9 @@ int M_ChangeMenu(MenuID_t cm)
} }
newrendermode = getrendermode(); newrendermode = getrendermode();
newfullscreen = fullscreen; newfullscreen = fullscreen;
#ifdef USE_OPENGL
newvsync = vsync; newvsync = vsync;
#endif
break; break;
case MENU_ADVSOUND: case MENU_ADVSOUND: