Skip to content

Commit 42940ba

Browse files
committed
Base SDL3: shrink diff a bit more
1 parent 9acf2ef commit 42940ba

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src_c/base.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,15 +2080,13 @@ PG_PixelFormatEnum pg_default_convert_format = 0;
20802080
static PG_PixelFormatEnum
20812081
pg_GetDefaultConvertFormat(void)
20822082
{
2083-
#if SDL_VERSION_ATLEAST(3, 0, 0)
20842083
if (pg_default_screen) {
2084+
#if SDL_VERSION_ATLEAST(3, 0, 0)
20852085
return pg_default_screen->surf->format;
2086-
}
20872086
#else
2088-
if (pg_default_screen) {
20892087
return pg_default_screen->surf->format->format;
2090-
}
20912088
#endif
2089+
}
20922090
return pg_default_convert_format;
20932091
}
20942092

src_c/surface.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,11 +1589,7 @@ pg_DisplayFormat(SDL_Surface *surface)
15891589
" or Window.get_surface().");
15901590
return NULL;
15911591
}
1592-
#if SDL_VERSION_ATLEAST(3, 0, 0)
1593-
return SDL_ConvertSurface(surface, default_format);
1594-
#else
1595-
return SDL_ConvertSurfaceFormat(surface, default_format, 0);
1596-
#endif
1592+
return PG_ConvertSurfaceFormat(surface, default_format);
15971593
}
15981594

15991595
static SDL_Surface *
@@ -1616,9 +1612,6 @@ pg_DisplayFormatAlpha(SDL_Surface *surface)
16161612
#endif
16171613
case SDL_PIXELFORMAT_ABGR1555:
16181614
case SDL_PIXELFORMAT_BGR565:
1619-
pfe = SDL_PIXELFORMAT_ABGR8888;
1620-
break;
1621-
16221615
case PG_PIXELFORMAT_XBGR8888:
16231616
case SDL_PIXELFORMAT_ABGR8888:
16241617
pfe = SDL_PIXELFORMAT_ABGR8888;

0 commit comments

Comments
 (0)