From: Holger Schemel Date: Mon, 11 Jun 2018 17:33:59 +0000 (+0200) Subject: fixed potential bug with default step size when increasing/decreasing level X-Git-Tag: 4.1.1.0~135 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ff17e7cd84029e629913550d3c760e80e8c15473;p=rocksndiamonds.git fixed potential bug with default step size when increasing/decreasing level --- diff --git a/src/screens.c b/src/screens.c index 80c10ca9..067f630a 100644 --- a/src/screens.c +++ b/src/screens.c @@ -8251,7 +8251,9 @@ static void HandleScreenGadgets(struct GadgetInfo *gi) { int id = gi->custom_id; int button = gi->event.button; - int step = (button == 1 ? 1 : button == 2 ? 5 : 10); + int step = (button == MB_LEFTBUTTON ? 1 : + button == MB_MIDDLEBUTTON ? 5 : + button == MB_RIGHTBUTTON ? 10 : 1); switch (id) {