hedgewars/uRenderUtils.pas
changeset 13489 8935dcc0e130
parent 12591 7bae1fab444b
child 14634 b055360684bd
--- a/hedgewars/uRenderUtils.pas	Mon Jul 16 04:50:23 2018 +0200
+++ b/hedgewars/uRenderUtils.pas	Mon Jul 16 19:15:22 2018 +0200
@@ -46,7 +46,7 @@
 begin
     r:= rect^;
     if Clear then
-        SDL_FillRect(Surface, @r, 0);
+        SDL_FillRect(Surface, @r, SDL_MapRGB(Surface^.format, 0, 0, 0));
 
     BorderColor:= SDL_MapRGB(Surface^.format, BorderColor shr 16, BorderColor shr 8, BorderColor and $FF);
     FillColor:= SDL_MapRGB(Surface^.format, FillColor shr 16, FillColor shr 8, FillColor and $FF);
@@ -554,7 +554,7 @@
     rect.h:= textHeight + cornerHeight * 2 - edgeHeight * 2;
     i:= rect.w;
     j:= rect.h;
-    SDL_FillRect(finalSurface, @rect, cWhiteColor);
+    SDL_FillRect(finalSurface, @rect, SDL_MapRGB(finalSurface^.format, cWhiteColor shr 16, cWhiteColor shr 8, cWhiteColor and $FF));
 
     pos:= 1; line:= 0;
     while GetNextSpeechLine(s, #1, pos, substr) do