src/render/software/SDL_render_sw.c
changeset 12383 f6430feceeda
parent 12381 dc9108cd4340
child 12411 148df74b141c
     1.1 --- a/src/render/software/SDL_render_sw.c	Thu Nov 01 12:31:45 2018 -0400
     1.2 +++ b/src/render/software/SDL_render_sw.c	Thu Nov 01 20:04:24 2018 +0300
     1.3 @@ -599,7 +599,11 @@
     1.4                  SDL_assert(viewport != NULL);
     1.5                  cliprect = cmd->data.cliprect.enabled ? &cmd->data.cliprect.rect : NULL;
     1.6                  if (cliprect) {
     1.7 -                    SDL_Rect clip_rect = { cliprect->x + viewport->x, cliprect->y + viewport->y, cliprect->w, cliprect->h };
     1.8 +                    SDL_Rect clip_rect;
     1.9 +                    clip_rect.x = cliprect->x + viewport->x;
    1.10 +                    clip_rect.y = cliprect->y + viewport->y;
    1.11 +                    clip_rect.w = cliprect->w;
    1.12 +                    clip_rect.h = cliprect->h;
    1.13                      SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
    1.14                      SDL_SetClipRect(surface, &clip_rect);
    1.15                  } else {