# HG changeset patch
# User sheepluva
# Date 1346407608 -7200
# Node ID 7a8b2f04c7ddf46b62abe1dc0a1c39523ee5e5c2
# Parent  ca14ec44b223b2525437467bae1bbd50c89af291
don't query/print GL_AUX_BUFFERS if video recording is disabled

diff -r ca14ec44b223 -r 7a8b2f04c7dd hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Fri Aug 31 11:24:57 2012 +0200
+++ b/hedgewars/uStore.pas	Fri Aug 31 12:06:48 2012 +0200
@@ -687,7 +687,9 @@
 procedure SetupOpenGL;
 //var vendor: shortstring = '';
 var buf: array[byte] of char;
+{$IFDEF USE_VIDEO_RECORDING}
     AuxBufNum: LongInt;
+{$ENDIF}
     tmpstr: AnsiString;
     tmpint: LongInt;
     tmpn: LongInt;
@@ -736,14 +738,16 @@
 {$ENDIF}
 //SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
 *)
-    glGetIntegerv(GL_AUX_BUFFERS, @AuxBufNum);
 
     // everyone love debugging
     AddFileLog('OpenGL-- Renderer: ' + shortstring(pchar(glGetString(GL_RENDERER))));
     AddFileLog('  |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR))));
     AddFileLog('  |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION))));
     AddFileLog('  |----- Texture Size: ' + inttostr(MaxTextureSize));
-    AddFileLog('  |----- Number of auxilary buffers: ' + inttostr(AuxBufNum));
+{$IFDEF USE_VIDEO_RECORDING}
+    glGetIntegerv(GL_AUX_BUFFERS, @AuxBufNum);
+    AddFileLog('  |----- Number of auxiliary buffers: ' + inttostr(AuxBufNum));
+{$ENDIF}
     AddFileLog('  \----- Extensions: ');
     // fetch extentions and store them in string
     tmpstr := StrPas(PChar(glGetString(GL_EXTENSIONS)));
@@ -780,7 +784,7 @@
         begin
             glDrawBuffer(GL_AUX0);
             glReadBuffer(GL_AUX0);
-            AddFileLog('Using auxilary buffer for video recording.');
+            AddFileLog('Using auxiliary buffer for video recording.');
         end
         else
         begin