src/render/SDL_render.c
changeset 6581 008057dcc079
parent 6579 2390a7403b77
child 6885 700f1b25f77f
child 8400 1315402d9028
     1.1 --- a/src/render/SDL_render.c	Fri Oct 12 02:33:34 2012 -0700
     1.2 +++ b/src/render/SDL_render.c	Fri Oct 12 02:56:41 2012 -0700
     1.3 @@ -926,6 +926,8 @@
     1.4          /* Make a backup of the viewport */
     1.5          renderer->viewport_backup = renderer->viewport;
     1.6          renderer->scale_backup = renderer->scale;
     1.7 +        renderer->logical_w_backup = renderer->logical_w;
     1.8 +        renderer->logical_h_backup = renderer->logical_h;
     1.9      }
    1.10      renderer->target = texture;
    1.11  
    1.12 @@ -940,9 +942,13 @@
    1.13          renderer->viewport.h = texture->h;
    1.14          renderer->scale.x = 1.0f;
    1.15          renderer->scale.y = 1.0f;
    1.16 +        renderer->logical_w = 0;
    1.17 +        renderer->logical_h = 0;
    1.18      } else {
    1.19          renderer->viewport = renderer->viewport_backup;
    1.20          renderer->scale = renderer->scale_backup;
    1.21 +        renderer->logical_w = renderer->logical_w_backup;
    1.22 +        renderer->logical_h = renderer->logical_h_backup;
    1.23      }
    1.24      if (renderer->UpdateViewport(renderer) < 0) {
    1.25          return -1;