print opengl extensions in new lines for ogllog
otherwise this may still get truncated and lots of text editor also complain about a super long single line of text also fix null ptr dereferencing into strtok should strdup return null
This commit is contained in:
1 parent
1217089d81
commit
eccc3eb33f
2 files changed
+8
-4
No files matched your search
@@ -5979,7 +5979,7 @@ static void COM_HWR_glinfo(void)
|
||||
// if the GPU is super new and supports a bajillion extensions - xyzzy
|
||||
|
||||
char *copy = strdup((const char*)gl_extensions);
|
||||
char *ext = strtok(copy, " ");
|
||||
char *ext;
|
||||
|
||||
if (copy == NULL)
|
||||
{
|
||||
@@ -5987,6 +5987,8 @@ static void COM_HWR_glinfo(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ext = strtok(copy, " ");
|
||||
|
||||
do
|
||||
{
|
||||
CONS_Printf(" - %s\n", ext);
|
||||
|
||||
+5
-3
@@ -137,13 +137,13 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
|
||||
GL_DBG_Printf("OpenGL %s\n", gl_version);
|
||||
GL_DBG_Printf("GPU: %s\n", gl_renderer);
|
||||
GL_DBG_Printf("Extensions:");
|
||||
GL_DBG_Printf("Extensions: \n");
|
||||
|
||||
{
|
||||
// Need to do it with strtok for same reason its done like that in gr_glinfo command
|
||||
|
||||
char *copy = strdup((const char*)gl_extensions);
|
||||
char *ext = strtok(copy, " ");
|
||||
char *ext;
|
||||
|
||||
if (copy == NULL)
|
||||
{
|
||||
@@ -151,9 +151,11 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
}
|
||||
else
|
||||
{
|
||||
ext = strtok(copy, " ");
|
||||
|
||||
do
|
||||
{
|
||||
GL_DBG_Printf(" %s", ext);
|
||||
GL_DBG_Printf(" - %s\n", ext);
|
||||
} while ((ext = strtok(NULL, " ")) != NULL);
|
||||
|
||||
free(copy);
|
||||
|
||||
Reference in new issue
Block a user