Skip to content

Commit

Permalink
Fixed bug 3174 - SDL_SetRenderTarget clip rect
Browse files Browse the repository at this point in the history
Marcel Bakker

In SDL_SetRenderTarget(),
i think the intended behavior was to clear the clip rect when a new target is set.
  • Loading branch information
slouken committed Oct 1, 2016
1 parent f4b26cd commit 67901f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/render/SDL_render.c
Expand Up @@ -1106,6 +1106,8 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
renderer->viewport.y = 0;
renderer->viewport.w = texture->w;
renderer->viewport.h = texture->h;
SDL_zero(renderer->clip_rect);
renderer->clipping_enabled = SDL_FALSE;
renderer->scale.x = 1.0f;
renderer->scale.y = 1.0f;
renderer->logical_w = texture->w;
Expand Down

0 comments on commit 67901f5

Please sign in to comment.