Merge pull request #43 from roginvs/use_coefficients_for_scrolling

Keep original scrolling coefficient for main game scrolling
This commit is contained in:
Vasilii Rogin
2025-03-07 15:04:44 +02:00
committed by GitHub
+3 -2
View File
@@ -411,8 +411,9 @@ void _mouse_info()
if (!touch_get_pan_mode() && gesture.numberOfTouches == 1) {
_mouse_simulate_input(gesture.x - prevx, gesture.y - prevy, 0);
} else if (touch_get_pan_mode() || gesture.numberOfTouches == 2) {
gMouseWheelX = (prevx - gesture.x) / 8;
gMouseWheelY = (gesture.y - prevy) / 8;
int coefficient = touch_get_pan_mode() ? 8 : 2;
gMouseWheelX = (prevx - gesture.x) / coefficient;
gMouseWheelY = (gesture.y - prevy) / coefficient;
if (gMouseWheelX != 0 || gMouseWheelY != 0) {
gMouseEvent |= MOUSE_EVENT_WHEEL;