Initialized default scale for software renderer (thanks Marcus von Appen!)
authorSam Lantinga <slouken@libsdl.org>
Mon, 01 Oct 2012 23:28:19 -0700
changeset 6532 58f726a2fc82
parent 6531 1ab2e34b90cc
child 6533 c784245304dd
Initialized default scale for software renderer (thanks Marcus von Appen!)
src/render/SDL_render.c
--- a/src/render/SDL_render.c	Mon Oct 01 23:23:04 2012 -0700
+++ b/src/render/SDL_render.c	Mon Oct 01 23:28:19 2012 -0700
@@ -268,8 +268,6 @@
         renderer->window = window;
         renderer->scale.x = 1.0f;
         renderer->scale.y = 1.0f;
-        renderer->logical_w = 0;
-        renderer->logical_h = 0;
 
         if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
             renderer->hidden = SDL_TRUE;
@@ -299,6 +297,8 @@
 
     if (renderer) {
         renderer->magic = &renderer_magic;
+        renderer->scale.x = 1.0f;
+        renderer->scale.y = 1.0f;
 
         SDL_RenderSetViewport(renderer, NULL);
     }