From: Holger Schemel Date: Thu, 26 Apr 2018 17:12:26 +0000 (+0200) Subject: fixed potential bug with alpha blending when using virtual buttons X-Git-Tag: 4.1.1.0~180 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=0bd8e1ee6077beacfa455dbe1e93aa9de726a797 fixed potential bug with alpha blending when using virtual buttons --- 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; }