src/render/SDL_render.c
changeset 6579 2390a7403b77
parent 6578 77d70ec131bc
child 6581 008057dcc079
     1.1 --- a/src/render/SDL_render.c	Fri Oct 12 02:20:10 2012 -0700
     1.2 +++ b/src/render/SDL_render.c	Fri Oct 12 02:30:03 2012 -0700
     1.3 @@ -1057,7 +1057,10 @@
     1.4      } else {
     1.5          renderer->viewport.x = 0;
     1.6          renderer->viewport.y = 0;
     1.7 -        if (renderer->window) {
     1.8 +        if (renderer->target) {
     1.9 +            SDL_QueryTexture(renderer->target, NULL, NULL,
    1.10 +                              &renderer->viewport.w, &renderer->viewport.h);
    1.11 +        } else if (renderer->window) {
    1.12              SDL_GetWindowSize(renderer->window,
    1.13                                &renderer->viewport.w, &renderer->viewport.h);
    1.14          } else {