From b3e9b3563bf0505ed1a372beedcb5991f6b45928 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 23 Jul 2013 19:18:01 -0700 Subject: [PATCH] A little cleanup on the cleanup, just for consistency. --- src/render/SDL_render.c | 2 +- src/video/SDL_surface.c | 2 ++ src/video/cocoa/SDL_cocoaevents.m | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 410ee8928..3cf467d64 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1467,7 +1467,7 @@ SDL_RenderDrawRects(SDL_Renderer * renderer, int SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect) { - SDL_Rect full_rect = {0}; + SDL_Rect full_rect = { 0, 0, 0, 0 }; CHECK_RENDERER_MAGIC(renderer, -1); diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 594964181..ea7168865 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -529,6 +529,8 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect, /* If the destination rectangle is NULL, use the entire dest surface */ if (dstrect == NULL) { fulldst.x = fulldst.y = 0; + fulldst.w = dst->w; + fulldst.h = dst->h; dstrect = &fulldst; } diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index c1d40c0f2..f0a65e322 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -138,7 +138,7 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam NSMenu *windowMenu; NSMenuItem *menuItem; - if (!NSApp) { + if (NSApp == nil) { return; }