More fixes
authorTobias Markus <tobbi@mozilla-uk.org>
Mon, 12 May 2014 10:51:48 +0000 (12:51 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Mon, 12 May 2014 10:51:48 +0000 (12:51 +0200)
src/video/sdl/sdl_renderer.cpp
src/video/sdl/sdl_renderer.hpp

index c86758f..f4a99d2 100644 (file)
@@ -151,6 +151,8 @@ SDLRenderer::SDLRenderer() :
                             width, height,
                             SDL_WINDOW_OPENGL );
          SDL_GLContext glcontext = SDL_GL_CreateContext(window);
+    renderer = SDL_CreateRenderer(window, -1, 0);
+
        
   if(window == 0) {
     std::stringstream msg;
@@ -444,7 +446,7 @@ SDLRenderer::do_take_screenshot()
 void
 SDLRenderer::flip()
 {
-  SDL_Flip(screen);
+  SDL_RenderPresent(renderer);
 }
 
 void
index 7f78180..d572f5c 100644 (file)
@@ -17,8 +17,8 @@
 #ifndef HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP
 #define HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP
 
-#include <SDL_video.h>
-
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_video.h"
 #include "video/renderer.hpp"
 
 class SDLRenderer : public Renderer
@@ -40,6 +40,7 @@ public:
 
 private:
   SDL_Surface *screen;
+  SDL_Renderer *renderer;
   int numerator;
   int denominator;