fix driver logging
authornemo
Sun, 13 Oct 2013 14:21:35 -0400
changeset 9530 0dc3b8f94b0b
parent 9528 9351e96990ae
child 9533 db77654c3565
fix driver logging
hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Sun Oct 13 21:53:42 2013 +0400
+++ b/hedgewars/uStore.pas	Sun Oct 13 14:21:35 2013 -0400
@@ -704,20 +704,20 @@
 end;
 
 procedure SetupOpenGL;
-var name: array[byte] of char;
+var buf: array[byte] of char;
     AuxBufNum: LongInt = 0;
     tmpstr: AnsiString;
     tmpint: LongInt;
     tmpn: LongInt;
 begin
 {$IFDEF SDL2}
-    name:= SDL_GetCurrentVideoDriver();
+    AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_GetCurrentVideoDriver()) + ')');
 {$ELSE}
-    name:= SDL_VideoDriverName(name, sizeof(name));
+    buf[0]:= char(0); // avoid compiler hint
+    AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')');
 {$ENDIF}
 
     AuxBufNum:= AuxBufNum;
-    AddFileLog('Setting up OpenGL (using driver: ' + shortstring(name) + ')');
 
 {$IFDEF MOBILE}
     // TODO: this function creates an opengles1.1 context