Added in #if guard for ARM achitectures.

This commit is contained in:
Adam Harrison 2021-06-09 18:05:39 -04:00
parent 29837d0c41
commit aa9f16c74c
1 changed files with 6 additions and 2 deletions

View File

@ -309,8 +309,12 @@ void ren_draw_rect(RenRect rect, RenColor color) {
int dr = surface->w - (x2 - x1); int dr = surface->w - (x2 - x1);
if (color.a == 0xff) { if (color.a == 0xff) {
#if defined(__arm__) || defined(__aarch64__)
rect_draw_loop(color);
#else
SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 }; SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 };
SDL_FillRect(surface, &rect, 255 << 24 | color.r << 16 | color.g << 8 | color.r); SDL_FillRect(surface, &rect, SDL_MapRGBA(surface->format, color.r, color.g, color.b, color.a));
#endif
} else { } else {
rect_draw_loop(blend_pixel(*d, color)); rect_draw_loop(blend_pixel(*d, color));
} }