changed using same (little endian) pixel format everywhere
authorHolger Schemel <info@artsoft.org>
Thu, 13 Oct 2022 18:35:38 +0000 (20:35 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 13 Oct 2022 18:38:32 +0000 (20:38 +0200)
This change also has the effect that the code compiles using versions
of the SDL library older than 2.0.5 (which introduced the pixel format
alias name used before).

src/files.c

index cdb890b92f52325e57ff16136f5696cadbbec4ae..5e95fb80f0cd908e4aeaa08800cd14b2c7738dd3 100644 (file)
@@ -13489,7 +13489,7 @@ void CreateCollectElementImages(void)
                  SDL_MapRGB(dst_bitmap->surface->format, 0x00, 0x00, 0x00));
 
   dst_bitmap->surface =
-    SDL_ConvertSurfaceFormat(dst_bitmap->surface, SDL_PIXELFORMAT_RGBA32, 0);
+    SDL_ConvertSurfaceFormat(dst_bitmap->surface, SDL_PIXELFORMAT_ARGB8888, 0);
 
   for (i = 0; i < MAX_NUM_ELEMENTS; i++)
   {
@@ -13516,7 +13516,7 @@ void CreateCollectElementImages(void)
                    SDL_MapRGB(tmp_bitmap->surface->format, 0x00, 0x00, 0x00));
 
     tmp_bitmap->surface =
-      SDL_ConvertSurfaceFormat(tmp_bitmap->surface, SDL_PIXELFORMAT_RGBA32, 0);
+      SDL_ConvertSurfaceFormat(tmp_bitmap->surface, SDL_PIXELFORMAT_ARGB8888, 0);
 
     tmp_bitmap->surface_masked = tmp_bitmap->surface;