From 29837d0c410ac81500c3c87edc01fbc24914ca57 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 8 Jun 2021 21:31:09 -0400 Subject: [PATCH] Replaced fill loop with SDL_FillRect. --- src/renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer.c b/src/renderer.c index b08c25d..9be0858 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -309,7 +309,8 @@ void ren_draw_rect(RenRect rect, RenColor color) { int dr = surface->w - (x2 - x1); if (color.a == 0xff) { - rect_draw_loop(color); + SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 }; + SDL_FillRect(surface, &rect, 255 << 24 | color.r << 16 | color.g << 8 | color.r); } else { rect_draw_loop(blend_pixel(*d, color)); }