software: Fixed compiler warning and dos2unix'd the endlines.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Jun 2019 15:06:35 -0400
changeset 12837e319b798dc2d
parent 12836 32839175c0e4
child 12838 4a089aa4ff81
software: Fixed compiler warning and dos2unix'd the endlines.
src/render/software/SDL_render_sw.c
     1.1 --- a/src/render/software/SDL_render_sw.c	Tue Jun 11 14:09:53 2019 -0400
     1.2 +++ b/src/render/software/SDL_render_sw.c	Tue Jun 11 15:06:35 2019 -0400
     1.3 @@ -578,30 +578,29 @@
     1.4  static void
     1.5  SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate)
     1.6  {
     1.7 -    if (drawstate->surface_cliprect_dirty) {
     1.8 -        const SDL_Rect *viewport = drawstate->viewport;
     1.9 -        const SDL_Rect *cliprect = drawstate->cliprect;
    1.10 -        SDL_assert(viewport != NULL);  /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
    1.11 -
    1.12 -        if (cliprect != NULL) {
    1.13 -            SDL_Rect clip_rect;
    1.14 -            clip_rect.x = cliprect->x + viewport->x;
    1.15 -            clip_rect.y = cliprect->y + viewport->y;
    1.16 -            clip_rect.w = cliprect->w;
    1.17 -            clip_rect.h = cliprect->h;
    1.18 -            SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
    1.19 -            SDL_SetClipRect(surface, &clip_rect);
    1.20 -        } else {
    1.21 -            SDL_SetClipRect(surface, drawstate->viewport);
    1.22 +    if (drawstate->surface_cliprect_dirty) {
    1.23 +        const SDL_Rect *viewport = drawstate->viewport;
    1.24 +        const SDL_Rect *cliprect = drawstate->cliprect;
    1.25 +        SDL_assert(viewport != NULL);  /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
    1.26 +
    1.27 +        if (cliprect != NULL) {
    1.28 +            SDL_Rect clip_rect;
    1.29 +            clip_rect.x = cliprect->x + viewport->x;
    1.30 +            clip_rect.y = cliprect->y + viewport->y;
    1.31 +            clip_rect.w = cliprect->w;
    1.32 +            clip_rect.h = cliprect->h;
    1.33 +            SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
    1.34 +            SDL_SetClipRect(surface, &clip_rect);
    1.35 +        } else {
    1.36 +            SDL_SetClipRect(surface, drawstate->viewport);
    1.37          }
    1.38 -        drawstate->surface_cliprect_dirty = SDL_FALSE;
    1.39 +        drawstate->surface_cliprect_dirty = SDL_FALSE;
    1.40      }
    1.41  }
    1.42  
    1.43  static int
    1.44  SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
    1.45  {
    1.46 -    SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
    1.47      SDL_Surface *surface = SW_ActivateRenderer(renderer);
    1.48      SW_DrawStateCache drawstate;
    1.49