Better fix. Keeping values intact
authorTobias Markus <tobbi@mozilla-uk.org>
Wed, 6 Aug 2014 12:32:45 +0000 (14:32 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Wed, 6 Aug 2014 12:32:45 +0000 (14:32 +0200)
src/video/sdl/sdl_lightmap.cpp

index 9638c2a..2630a72 100644 (file)
@@ -30,11 +30,14 @@ SDLLightmap::SDLLightmap() :
 {
   LIGHTMAP_DIV = 8;
 
+  width = SCREEN_WIDTH;
+  height = SCREEN_HEIGHT;
+
   SDL_Renderer* renderer = static_cast<SDLRenderer*>(Renderer::instance())->get_sdl_renderer();
   texture = SDL_CreateTexture(renderer,
                               SDL_PIXELFORMAT_RGB888,
                               SDL_TEXTUREACCESS_TARGET,
-                              SCREEN_WIDTH, SCREEN_HEIGHT);
+                              width, height);
   if (!texture)
   {
     std::stringstream msg;