Works around a bug with newer NVIDIA GL drivers where creating a GL context

would remove write access to our code sections.

bugs 3086185 and 3104646



git-svn-id: https://svn.eduke32.com/eduke32@1724 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2010-11-08 04:56:10 +00:00
parent 8206978b8a
commit 2751ea0c5d
1 changed files with 3 additions and 0 deletions

View File

@ -8185,6 +8185,9 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da
if (setvideomode(daxdim,daydim,dabpp,davidoption) < 0) return(-1);
// Workaround possible bugs in the GL driver
makeasmwriteable();
#if defined(POLYMOST) && defined(USE_OPENGL)
if (dabpp > 8) rendmode = glrendmode; // GL renderer
else if (dabpp == 8 && j > 8) rendmode = 0; // going from GL to software activates softpolymost