hedgewars/SDLh.pas
changeset 7110 c91d33837b0d
parent 7049 35d762458d66
child 7167 0b3b306f129a
--- a/hedgewars/SDLh.pas	Thu May 03 22:48:02 2012 +0200
+++ b/hedgewars/SDLh.pas	Tue May 22 11:19:32 2012 +0200
@@ -395,6 +395,7 @@
         end;
 
 
+    PSDL_Color = ^TSDL_Color;
     TSDL_Color = record
         case Byte of
             0: ( r: Byte;
@@ -403,7 +404,6 @@
                  unused: Byte; );
             1: ( value: LongWord; );
         end;
-    PSDL_Color = ^TSDL_Color;
 
 
     PSDL_RWops = ^TSDL_RWops;
@@ -734,10 +734,10 @@
 
     TSDL_EventFilter = function( event : PSDL_Event ): Integer; cdecl;
 
+    TByteArray = array[0..65535] of Byte;
     PByteArray = ^TByteArray;
-    TByteArray = array[0..65535] of Byte;
+    TLongWordArray = array[0..16383] of LongWord;
     PLongWordArray = ^TLongWordArray;
-    TLongWordArray = array[0..16383] of LongWord;
 
     PSDL_Thread = Pointer;
     PSDL_mutex = Pointer;
@@ -969,7 +969,7 @@
 {$ENDIF}
 
 {* Compatibility between SDL-1.2 and SDL-1.3 *}
-procedure SDL_WarpMouse(x, y: Word); {$IFNDEF SDL13}cdecl; external SDLLibName;{$ENDIF}
+procedure SDL_WarpMouse(x, y: Word); {$IFDEF SDL13}inline{$ELSE}cdecl; external SDLLibName{$ENDIF};
 function  SDL_GetKeyState(numkeys: PLongInt): PByteArray; cdecl; external SDLLibName {$IFDEF SDL13} name 'SDL_GetKeyboardState'{$ENDIF};
 function  SDL_AllocFormat(format: LongWord): PSDL_PixelFormat; {$IFDEF SDL13}cdecl; external SDLLibName;{$ENDIF}
 procedure SDL_FreeFormat(pixelformat: PSDL_PixelFormat); {$IFDEF SDL13}cdecl; external SDLLibName;{$ENDIF}
@@ -1055,12 +1055,12 @@
 
 implementation
 {$IFDEF SDL13}
-uses strings, uVariables;
+uses strings, uVariables, uStore;
 
 // compatible functions
-procedure SDL_WarpMouse(x, y: Word);
+procedure SDL_WarpMouse(x, y: Word); inline;
 begin
-    SDL_WarpMouseInWindow(SDLwindow, x, y);
+    WarpMouse(x, y);
 end;
 
 function SDL_VideoDriverName(namebuf: PChar; maxlen: LongInt): PChar;
@@ -1077,6 +1077,7 @@
 
 function SDL_EnableUNICODE(enable: LongInt): LongInt;
 begin
+    enable:= enable; // avoid hint
     SDL_StartTextInput();
     SDL_EnableUNICODE:= 0;
 end;