From: Holger Schemel Date: Mon, 20 Apr 2020 21:23:55 +0000 (+0200) Subject: fixed bug with invisible, but active overlay touch buttons X-Git-Tag: 4.2.0.0~47 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=1651b494b33800344452c3e88fa54412063393ab fixed bug with invisible, but active overlay touch buttons This fixes a nasty bug with handling (invisible) overlay touch buttons on devices without touch screen. --- diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index b30082a2..cbe1cabc 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -1479,6 +1479,10 @@ static void MapGadgetExt(struct GadgetInfo *gi, boolean redraw) if (gi == NULL || gi->deactivated || gi->mapped) return; + // do not map overlay touch buttons if touch screen is not used + if (gi->overlay_touch_button && !runtime.uses_touch_device) + return; + gi->mapped = TRUE; if (redraw)