Fix uninitialized alpha values of rendered text
authorWuzzy <Wuzzy2@mail.ru>
Tue, 02 Apr 2019 23:14:31 +0200
changeset 14768 7dfc6ed13337
parent 14767 a8a328ac3cac
child 14769 2ad6f0555e61
Fix uninitialized alpha values of rendered text
hedgewars/uRenderUtils.pas
hedgewars/uStore.pas
--- a/hedgewars/uRenderUtils.pas	Tue Apr 02 22:57:46 2019 +0200
+++ b/hedgewars/uRenderUtils.pas	Tue Apr 02 23:14:31 2019 +0200
@@ -106,6 +106,7 @@
     clr.r:= (Color shr 16) and $FF;
     clr.g:= (Color shr 8) and $FF;
     clr.b:= Color and $FF;
+    clr.a:= $FF;
     if (not IsTooDarkToRead(Color)) then
         DrawRoundRect(@finalRect, cWhiteColor, cNearBlackColor, Surface, true)
     else
--- a/hedgewars/uStore.pas	Tue Apr 02 22:57:46 2019 +0200
+++ b/hedgewars/uStore.pas	Tue Apr 02 23:14:31 2019 +0200
@@ -113,6 +113,7 @@
 clr.r:= Color shr 16;
 clr.g:= (Color shr 8) and $FF;
 clr.b:= Color and $FF;
+clr.a:= $FF;
 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, s, clr);
 if tmpsurf = nil then exit;
 tmpsurf:= doSurfaceConversion(tmpsurf);