summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/tr_init.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/renderer/tr_init.c b/src/renderer/tr_init.c
index fff27eff..4b80c922 100644
--- a/src/renderer/tr_init.c
+++ b/src/renderer/tr_init.c
@@ -891,6 +891,27 @@ void GL_SetDefaultState( void )
qglDisable( GL_BLEND );
}
+/*
+================
+R_PrintLongString
+
+Workaround for ri.Printf's 1024 characters buffer limit.
+================
+*/
+void R_PrintLongString(const char *string) {
+ char buffer[1024];
+ const char *p;
+ int size = strlen(string);
+
+ p = string;
+ while(size > 0)
+ {
+ Q_strncpyz(buffer, p, sizeof (buffer) );
+ ri.Printf( PRINT_ALL, "%s", buffer );
+ p += 1023;
+ size -= 1023;
+ }
+}
/*
================
@@ -913,7 +934,9 @@ void GfxInfo_f( void )
ri.Printf( PRINT_ALL, "\nGL_VENDOR: %s\n", glConfig.vendor_string );
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
- ri.Printf( PRINT_ALL, "GL_EXTENSIONS: %s\n", glConfig.extensions_string );
+ ri.Printf( PRINT_ALL, "GL_EXTENSIONS: " );
+ R_PrintLongString( glConfig.extensions_string );
+ ri.Printf( PRINT_ALL, "\n" );
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_UNITS_ARB: %d\n", glConfig.numTextureUnits );
ri.Printf( PRINT_ALL, "\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );