diff --git a/src_c/base.c b/src_c/base.c index 37e392b694..f42b045783 100644 --- a/src_c/base.c +++ b/src_c/base.c @@ -2080,15 +2080,13 @@ PG_PixelFormatEnum pg_default_convert_format = 0; static PG_PixelFormatEnum pg_GetDefaultConvertFormat(void) { -#if SDL_VERSION_ATLEAST(3, 0, 0) if (pg_default_screen) { +#if SDL_VERSION_ATLEAST(3, 0, 0) return pg_default_screen->surf->format; - } #else - if (pg_default_screen) { return pg_default_screen->surf->format->format; - } #endif + } return pg_default_convert_format; } diff --git a/src_c/surface.c b/src_c/surface.c index 52e3264b23..d4a8eae2e9 100644 --- a/src_c/surface.c +++ b/src_c/surface.c @@ -1589,11 +1589,7 @@ pg_DisplayFormat(SDL_Surface *surface) " or Window.get_surface()."); return NULL; } -#if SDL_VERSION_ATLEAST(3, 0, 0) - return SDL_ConvertSurface(surface, default_format); -#else - return SDL_ConvertSurfaceFormat(surface, default_format, 0); -#endif + return PG_ConvertSurfaceFormat(surface, default_format); } static SDL_Surface * @@ -1616,9 +1612,6 @@ pg_DisplayFormatAlpha(SDL_Surface *surface) #endif case SDL_PIXELFORMAT_ABGR1555: case SDL_PIXELFORMAT_BGR565: - pfe = SDL_PIXELFORMAT_ABGR8888; - break; - case PG_PIXELFORMAT_XBGR8888: case SDL_PIXELFORMAT_ABGR8888: pfe = SDL_PIXELFORMAT_ABGR8888;