From 0bd8e1ee6077beacfa455dbe1e93aa9de726a797 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 26 Apr 2018 19:12:26 +0200 Subject: [PATCH] fixed potential bug with alpha blending when using virtual buttons --- src/libgame/sdl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 34c40044..07064a4b 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2992,7 +2992,7 @@ static void DrawTouchInputOverlay() static int width = 0, height = 0; static int alpha_max = SDL_ALPHA_OPAQUE / 2; static int alpha_step = 5; - static int alpha_last = 0; + static int alpha_last = -1; static int alpha = 0; boolean active = (overlay.enabled && overlay.active); @@ -3042,7 +3042,6 @@ static void DrawTouchInputOverlay() SDL_FreeSurface(surface); SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND); - SDL_SetTextureAlphaMod(texture, alpha_max); initialized = TRUE; } -- 2.34.1