X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=df5b32425fe870d6c0d9547b19bafdc5b5e1bdcd;hb=22c1545e660b56b81728829aec43de128934ae04;hp=0fd3aa62eb6a319d7523357ce0419e4b2d0f455f;hpb=f56d8f7d479ffe32afaa258a86425d7a4e166751;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 0fd3aa62..df5b3242 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -3014,10 +3014,10 @@ static void DrawTouchInputOverlay_ShowGrid(int alpha) static void DrawTouchInputOverlay_ShowGridButtons(int alpha) { - static int alpha_max = SDL_ALPHA_OPAQUE / 2; - static int alpha_step = 5; static int alpha_direction = 0; static int alpha_highlight = 0; + int alpha_max = ALPHA_FROM_TRANSPARENCY(setup.touch.transparency); + int alpha_step = ALPHA_FADING_STEPSIZE(alpha_max); SDL_Rect rect; int grid_xsize = overlay.grid_xsize; int grid_ysize = overlay.grid_ysize; @@ -3103,10 +3103,10 @@ static void DrawTouchInputOverlay() static boolean deactivated = TRUE; static boolean show_grid = FALSE; static int width = 0, height = 0; - static int alpha_max = SDL_ALPHA_OPAQUE / 2; - static int alpha_step = 5; static int alpha_last = -1; static int alpha = 0; + int alpha_max = ALPHA_FROM_TRANSPARENCY(setup.touch.transparency); + int alpha_step = ALPHA_FADING_STEPSIZE(alpha_max); boolean active = (overlay.enabled && overlay.active); if (!active && deactivated)