From ce66aea07058de5bd855af2efb3828d84fe378a6 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 9 Sep 2021 04:05:10 +0200 Subject: [PATCH] Optimize masked Art blitting --- Source/utils/sdl_compat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/utils/sdl_compat.h b/Source/utils/sdl_compat.h index 5dfc3d05f..93280ff58 100644 --- a/Source/utils/sdl_compat.h +++ b/Source/utils/sdl_compat.h @@ -38,8 +38,9 @@ inline const Uint8 *SDLC_GetKeyState() inline int SDLC_SetColorKey(SDL_Surface *surface, Uint32 key) { #ifdef USE_SDL1 - return SDL_SetColorKey(surface, SDL_SRCCOLORKEY, key); + return SDL_SetColorKey(surface, SDL_SRCCOLORKEY | SDL_RLEACCEL, key); #else + SDL_SetSurfaceRLE(surface, 1); return SDL_SetColorKey(surface, SDL_TRUE, key); #endif }