added mouse wheel support also for SDL2 target
[rocksndiamonds.git] / src / libgame / gadgets.c
index 9ff99690e96a1f3438a9cc1b4dca79747beb6a0b..1a0da4b45f55ad6dd469efb796edd063049052b4 100644 (file)
@@ -704,6 +704,10 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
       return;
   }
 
+  // do not use direct gadget drawing anymore; this worked as a speed-up once,
+  // but would slow things down a lot now the screen is always fully redrawn
+  direct = FALSE;
+
   if (direct)
   {
     BlitBitmap(drawto, window,
@@ -1775,7 +1779,7 @@ boolean HandleGadgets(int mx, int my, int button)
        {
          boolean scroll_single_step = ((GetKeyModState() & KMOD_Alt) != 0);
 
-         item_steps = (scroll_single_step ? 1 : DEFAULT_WHEEL_STEPS);
+         item_steps = (scroll_single_step ? 1 : wheel_steps);
          item_direction = (button == MB_WHEEL_UP ||
                            button == MB_WHEEL_LEFT ? -1 : +1);
        }