mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-13 00:34:11 +00:00
regenerate gl_extensions_nice everytime the extensions string is retrieved
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@785 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
ab0ee719ef
commit
03ae1ca4e0
1 changed files with 6 additions and 6 deletions
|
@ -75,6 +75,7 @@ static const char *gl_vendor;
|
|||
static const char *gl_renderer;
|
||||
static const char *gl_version;
|
||||
static const char *gl_extensions;
|
||||
static char * gl_extensions_nice;
|
||||
|
||||
static vmode_t modelist[MAX_MODE_LIST];
|
||||
static int nummodes;
|
||||
|
@ -488,7 +489,7 @@ static char *GL_MakeNiceExtensionsList (const char *in)
|
|||
char *copy, *token, *out;
|
||||
int i, count;
|
||||
|
||||
if (!in) return NULL;
|
||||
if (!in) return Z_Strdup("(none)");
|
||||
|
||||
//each space will be replaced by 4 chars, so count the spaces before we malloc
|
||||
for (i = 0, count = 1; i < (int) strlen(in); i++)
|
||||
|
@ -518,11 +519,6 @@ GL_Info_f -- johnfitz
|
|||
*/
|
||||
static void GL_Info_f (void)
|
||||
{
|
||||
static char *gl_extensions_nice = NULL;
|
||||
|
||||
if (!gl_extensions_nice)
|
||||
gl_extensions_nice = GL_MakeNiceExtensionsList (gl_extensions);
|
||||
|
||||
Con_SafePrintf ("GL_VENDOR: %s\n", gl_vendor);
|
||||
Con_SafePrintf ("GL_RENDERER: %s\n", gl_renderer);
|
||||
Con_SafePrintf ("GL_VERSION: %s\n", gl_version);
|
||||
|
@ -760,6 +756,10 @@ static void GL_Init (void)
|
|||
gl_version = (const char *) glGetString (GL_VERSION);
|
||||
gl_extensions = (const char *) glGetString (GL_EXTENSIONS);
|
||||
|
||||
if (gl_extensions_nice != NULL)
|
||||
Z_Free (gl_extensions_nice);
|
||||
gl_extensions_nice = GL_MakeNiceExtensionsList (gl_extensions);
|
||||
|
||||
GL_CheckExtensions (); //johnfitz
|
||||
|
||||
if (SDL_strncasecmp(gl_renderer,"PowerVR",7)==0)
|
||||
|
|
Loading…
Reference in a new issue