From: Tobias Markus Date: Mon, 12 May 2014 10:51:48 +0000 (+0200) Subject: More fixes X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c2624ec9162122f2e625b57eac798ee37912c3e0;p=supertux.git More fixes --- diff --git a/src/video/sdl/sdl_renderer.cpp b/src/video/sdl/sdl_renderer.cpp index c86758fa2..f4a99d23a 100644 --- a/src/video/sdl/sdl_renderer.cpp +++ b/src/video/sdl/sdl_renderer.cpp @@ -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 diff --git a/src/video/sdl/sdl_renderer.hpp b/src/video/sdl/sdl_renderer.hpp index 7f7818006..d572f5cc5 100644 --- a/src/video/sdl/sdl_renderer.hpp +++ b/src/video/sdl/sdl_renderer.hpp @@ -17,8 +17,8 @@ #ifndef HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP #define HEADER_SUPERTUX_VIDEO_SDL_RENDERER_HPP -#include - +#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;