software: Fixed compiler warning and dos2unix'd the endlines.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c
index 5fe89e7..088a0a5 100644
--- a/src/render/software/SDL_render_sw.c
+++ b/src/render/software/SDL_render_sw.c
@@ -578,30 +578,29 @@ PrepTextureForCopy(const SDL_RenderCommand *cmd)
static void
SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate)
{
- if (drawstate->surface_cliprect_dirty) {
- const SDL_Rect *viewport = drawstate->viewport;
- const SDL_Rect *cliprect = drawstate->cliprect;
- SDL_assert(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
-
- if (cliprect != NULL) {
- SDL_Rect clip_rect;
- clip_rect.x = cliprect->x + viewport->x;
- clip_rect.y = cliprect->y + viewport->y;
- clip_rect.w = cliprect->w;
- clip_rect.h = cliprect->h;
- SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
- SDL_SetClipRect(surface, &clip_rect);
- } else {
- SDL_SetClipRect(surface, drawstate->viewport);
+ if (drawstate->surface_cliprect_dirty) {
+ const SDL_Rect *viewport = drawstate->viewport;
+ const SDL_Rect *cliprect = drawstate->cliprect;
+ SDL_assert(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
+
+ if (cliprect != NULL) {
+ SDL_Rect clip_rect;
+ clip_rect.x = cliprect->x + viewport->x;
+ clip_rect.y = cliprect->y + viewport->y;
+ clip_rect.w = cliprect->w;
+ clip_rect.h = cliprect->h;
+ SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
+ SDL_SetClipRect(surface, &clip_rect);
+ } else {
+ SDL_SetClipRect(surface, drawstate->viewport);
}
- drawstate->surface_cliprect_dirty = SDL_FALSE;
+ drawstate->surface_cliprect_dirty = SDL_FALSE;
}
}
static int
SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
- SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
SDL_Surface *surface = SW_ActivateRenderer(renderer);
SW_DrawStateCache drawstate;