From 5896ee56b2993916d318e23c0a73f7e328edd063 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Sun, 25 Aug 2019 22:40:16 -0700 Subject: [PATCH] Fix hilarious font rendering bug; format_conv_surf needs an Amask --- sc2/src/libs/graphics/sdl/sdl2_pure.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sc2/src/libs/graphics/sdl/sdl2_pure.c b/sc2/src/libs/graphics/sdl/sdl2_pure.c index 4836c1916..ac24f10b1 100644 --- a/sc2/src/libs/graphics/sdl/sdl2_pure.c +++ b/sc2/src/libs/graphics/sdl/sdl2_pure.c @@ -159,7 +159,9 @@ TFB_Pure_ConfigureVideo (int driver, int flags, int width, int height, int toggl } SDL_Screen = SDL_Screens[0]; TransitionScreen = SDL_Screens[2]; - if (0 != ReInit_Screen (&format_conv_surf, 0, 0)) + format_conv_surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 0, 0, + 32, R_MASK, G_MASK, B_MASK, A_MASK); + if (!format_conv_surf) { return -1; }