Fix SDL_GL_SwapWindow, engine renders graphics now sdl2transition
authorunc0rr
Thu, 07 Nov 2013 21:10:17 +0400
branchsdl2transition
changeset 9684 8113075dc7cc
parent 9682 aa2431ed87b2
child 9686 352393fc75be
Fix SDL_GL_SwapWindow, engine renders graphics now
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/uStore.pas
--- a/hedgewars/SDLh.pas	Thu Nov 07 21:06:30 2013 +0400
+++ b/hedgewars/SDLh.pas	Thu Nov 07 21:10:17 2013 +0400
@@ -1010,7 +1010,7 @@
 
 function  SDL_GL_CreateContext(window: PSDL_Window): PSDL_GLContext; cdecl; external SDLLibName;
 procedure SDL_GL_DeleteContext(context: PSDL_GLContext); cdecl; external SDLLibName;
-function  SDL_GL_SwapWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName;
+procedure SDL_GL_SwapWindow(window: PSDL_Window); cdecl; external SDLLibName;
 function  SDL_GL_SetSwapInterval(interval: LongInt): LongInt; cdecl; external SDLLibName;
 
 procedure SDL_VideoQuit; cdecl; external SDLLibName;
--- a/hedgewars/hwengine.pas	Thu Nov 07 21:06:30 2013 +0400
+++ b/hedgewars/hwengine.pas	Thu Nov 07 21:10:17 2013 +0400
@@ -363,7 +363,7 @@
             ParseCommand('fullscr 0', true);
         end;
 
-    ControllerInit(); // has to happen before InitKbdKeyTable to map keys
+    //ControllerInit(); // has to happen before InitKbdKeyTable to map keys
     InitKbdKeyTable();
     AddProgress();
 
--- a/hedgewars/uStore.pas	Thu Nov 07 21:06:30 2013 +0400
+++ b/hedgewars/uStore.pas	Thu Nov 07 21:10:17 2013 +0400
@@ -1264,7 +1264,7 @@
     if GameType = gmtRecord then
         exit;
 {$IFDEF SDL2}
-    SDLTry(SDL_GL_SwapWindow(SDLwindow) <> 0, 'SDL_GL_SwapWindow', true);
+    SDL_GL_SwapWindow(SDLwindow);
 {$ELSE}
     SDL_GL_SwapBuffers();
 {$ENDIF}