From aa9f16c74ca4aaab43b03a0af8aa91ad11a381a7 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Wed, 9 Jun 2021 18:05:39 -0400 Subject: [PATCH] Added in #if guard for ARM achitectures. --- src/renderer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer.c b/src/renderer.c index 9be08588..8cecbcf4 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -309,8 +309,12 @@ void ren_draw_rect(RenRect rect, RenColor color) { int dr = surface->w - (x2 - x1); if (color.a == 0xff) { - SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 }; - SDL_FillRect(surface, &rect, 255 << 24 | color.r << 16 | color.g << 8 | color.r); + #if defined(__arm__) || defined(__aarch64__) + rect_draw_loop(color); + #else + SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 }; + SDL_FillRect(surface, &rect, SDL_MapRGBA(surface->format, color.r, color.g, color.b, color.a)); + #endif } else { rect_draw_loop(blend_pixel(*d, color)); }