mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix crash in Mapster32 when switching from GL 3d mode to 2d mode.
git-svn-id: https://svn.eduke32.com/eduke32@6929 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cbf6dc3c42
commit
bcb7815118
1 changed files with 7 additions and 5 deletions
|
@ -9890,7 +9890,7 @@ int32_t videoSetGameMode(char davidoption, int32_t daxdim, int32_t daydim, int32
|
|||
|
||||
#ifdef USE_OPENGL
|
||||
if (dabpp > 8) rendmode = glrendmode; // GL renderer
|
||||
else if (dabpp == 8 && j > 8) rendmode = REND_CLASSIC;
|
||||
else rendmode = REND_CLASSIC;
|
||||
#endif
|
||||
|
||||
xdim = daxdim;
|
||||
|
@ -12759,19 +12759,21 @@ void videoSet2dMode(int32_t daxdim, int32_t daydim)
|
|||
ydim = yres;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
extern char nogl;
|
||||
|
||||
fxdim = (float) xres;
|
||||
fydim = (float) yres;
|
||||
#endif
|
||||
|
||||
if (!nogl)
|
||||
glsurface_initialize({ xres, yres });
|
||||
#endif
|
||||
videoAllocateBuffers();
|
||||
|
||||
ydim16 = yres - STATUS2DSIZ2;
|
||||
halfxdim16 = xres >> 1;
|
||||
midydim16 = ydim16 >> 1; // scale(200,yres,480);
|
||||
|
||||
videoBeginDrawing(); //{{{
|
||||
Bmemset((char *)frameplace, 0, yres*bytesperline);
|
||||
videoEndDrawing(); //}}}
|
||||
videoClearScreen(0L);
|
||||
}
|
||||
|
||||
qsetmode = ((daxdim<<16)|(daydim&0xffff));
|
||||
|
|
Loading…
Reference in a new issue