hedgewars/SDLh.pas
changeset 9378 2be457289e60
parent 9333 972fa9ecd587
child 9521 8054d9d775fd
child 9677 71626318f80e
child 9998 736015b847e3
--- a/hedgewars/SDLh.pas	Fri Jul 26 23:02:25 2013 +0200
+++ b/hedgewars/SDLh.pas	Sat Jul 27 01:06:47 2013 +0200
@@ -428,7 +428,12 @@
 
     (* SDL_RWops and friends *)
     PSDL_RWops = ^TSDL_RWops;
+{$IFDEF SDL2}
+    TSize  = function( context: PSDL_RWops): Int64; cdecl;
+    TSeek  = function( context: PSDL_RWops; offset: Int64; whence: LongInt ): Int64; cdecl;
+{$ELSE}
     TSeek  = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
+{$ENDIF}
     TRead  = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
     TWrite = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; num: LongInt ): LongInt; cdecl;
     TClose = function( context: PSDL_RWops ): LongInt; cdecl;
@@ -473,6 +478,9 @@
 {$ENDIF}
 
     TSDL_RWops = record
+{$IFDEF SDL2}
+        size: TSize;
+{$ENDIF}
         seek: TSeek;
         read: TRead;
         write: TWrite;