equal
deleted
inserted
replaced
928 |
928 |
929 CHECK_RENDERER_MAGIC(renderer, -1); |
929 CHECK_RENDERER_MAGIC(renderer, -1); |
930 |
930 |
931 /* If 'rect' == NULL, then outline the whole surface */ |
931 /* If 'rect' == NULL, then outline the whole surface */ |
932 if (!rect) { |
932 if (!rect) { |
933 SDL_Window *window = renderer->window; |
|
934 |
|
935 full_rect.x = 0; |
933 full_rect.x = 0; |
936 full_rect.y = 0; |
934 full_rect.y = 0; |
937 full_rect.w = renderer->viewport.w; |
935 full_rect.w = renderer->viewport.w; |
938 full_rect.h = renderer->viewport.h; |
936 full_rect.h = renderer->viewport.h; |
939 rect = &full_rect; |
937 rect = &full_rect; |
977 } |
975 } |
978 |
976 |
979 int |
977 int |
980 SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect) |
978 SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect) |
981 { |
979 { |
|
980 SDL_Rect full_rect; |
|
981 |
|
982 CHECK_RENDERER_MAGIC(renderer, -1); |
|
983 |
|
984 /* If 'rect' == NULL, then outline the whole surface */ |
|
985 if (!rect) { |
|
986 full_rect.x = 0; |
|
987 full_rect.y = 0; |
|
988 full_rect.w = renderer->viewport.w; |
|
989 full_rect.h = renderer->viewport.h; |
|
990 rect = &full_rect; |
|
991 } |
982 return SDL_RenderFillRects(renderer, rect, 1); |
992 return SDL_RenderFillRects(renderer, rect, 1); |
983 } |
993 } |
984 |
994 |
985 int |
995 int |
986 SDL_RenderFillRects(SDL_Renderer * renderer, |
996 SDL_RenderFillRects(SDL_Renderer * renderer, |