src/render/SDL_render.c
changeset 6578 77d70ec131bc
parent 6546 824535ce51b6
child 6579 2390a7403b77
     1.1 --- a/src/render/SDL_render.c	Thu Oct 11 15:05:00 2012 -0700
     1.2 +++ b/src/render/SDL_render.c	Fri Oct 12 02:20:10 2012 -0700
     1.3 @@ -952,6 +952,12 @@
     1.4      return 0;
     1.5  }
     1.6  
     1.7 +SDL_Texture *
     1.8 +SDL_GetRenderTarget(SDL_Renderer *renderer)
     1.9 +{
    1.10 +    return renderer->target;
    1.11 +}
    1.12 +
    1.13  static int
    1.14  UpdateLogicalSize(SDL_Renderer *renderer)
    1.15  {
    1.16 @@ -961,7 +967,9 @@
    1.17      float scale;
    1.18      SDL_Rect viewport;
    1.19  
    1.20 -    if (renderer->window) {
    1.21 +    if (renderer->target) {
    1.22 +        SDL_QueryTexture(renderer->target, NULL, NULL, &w, &h);
    1.23 +    } else if (renderer->window) {
    1.24          SDL_GetWindowSize(renderer->window, &w, &h);
    1.25      } else {
    1.26          /* FIXME */