From b1d6a97db4796d52061ddf8ad1cc035fba2538a2 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 11 Nov 2013 20:33:55 +0000 Subject: [PATCH] Mapster32: don't produce erratic behavior w/ crash when not in 3D mode. Also, BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4148 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 46b55b80a..8e52b7f11 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -5066,14 +5066,18 @@ static int32_t osdcmd_cvar_set_polymost(const osdfuncparm_t *parm) } else if (!Bstrcasecmp(parm->name, "r_downsize")) { - if (r_downsize != r_downsizevar && r_downsizevar != -1) + if (r_downsizevar == -1) + r_downsizevar = r_downsize; + + if (in3dmode() && r_downsize != r_downsizevar) { texcache_invalidate(); resetvideomode(); if (setgamemode(fullscreen,xdim,ydim,bpp)) OSD_Printf("restartvid: Reset failed...\n"); } - else r_downsizevar = r_downsize; + + r_downsizevar = r_downsize; return r; }