use old approach for printing gl extentions for pas2c (less complex/no StrUtils dependencies)
authorsheepluva
Fri, 31 Aug 2012 15:28:03 +0200
changeset 7637 60b213e5ded3
parent 7636 10caa79d4a80
child 7638 4560cd5b6ad0
use old approach for printing gl extentions for pas2c (less complex/no StrUtils dependencies)
hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Fri Aug 31 13:36:00 2012 +0200
+++ b/hedgewars/uStore.pas	Fri Aug 31 15:28:03 2012 +0200
@@ -21,7 +21,7 @@
 
 unit uStore;
 interface
-uses StrUtils, SysUtils, uConsts, SDLh, GLunit, uTypes, uLandTexture, uCaptions, uChat;
+uses {$IFNDEF PAS2C} StrUtils, {$ENDIF}SysUtils, uConsts, SDLh, GLunit, uTypes, uLandTexture, uCaptions, uChat;
 
 procedure initModule;
 procedure freeModule;
@@ -749,6 +749,7 @@
     AddFileLog('  |----- Number of auxiliary buffers: ' + inttostr(AuxBufNum));
 {$ENDIF}
     AddFileLog('  \----- Extensions: ');
+{$IFNDEF PAS2C}
     // fetch extentions and store them in string
     tmpstr := StrPas(PChar(glGetString(GL_EXTENSIONS)));
     tmpn := WordCount(tmpstr, [' ']);
@@ -766,8 +767,10 @@
         tmpint := tmpint + 3;
     end;
     until (tmpint > tmpn);
-    // doesn't seem to print >256 chars, also missing explicit PChar cast
-    // AddFileLogRaw(glGetString(GL_EXTENSIONS));
+{$ELSE}
+    // doesn't seem to print >256 chars
+    AddFileLogRaw(PChar(glGetString(GL_EXTENSIONS)));
+{$ENDIF}
     AddFileLog('');
 
     defaultFrame:= 0;