From 7d498a55deea468388dfe29a3ecdd9d1ae5b1ea8 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 11 Mar 2007 10:55:35 +0000 Subject: (svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions) It has to be enabled first (in patches->interface) first and this will disable scrollwheel zooming Note: patch setting "Map scrollwheel speed" might need to be changed since the "correct" setting appears to depend on what kind of mouse is in use (mighty mouse or touchpad) --- src/video/cocoa_v.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video') diff --git a/src/video/cocoa_v.mm b/src/video/cocoa_v.mm index e7531edbf..d4ae4c3e0 100644 --- a/src/video/cocoa_v.mm +++ b/src/video/cocoa_v.mm @@ -68,6 +68,7 @@ extern "C" void HideMenuBar(); #include "../debug.h" #include "../macros.h" #include "../os/macosx/splash.h" +#include "../variables.h" #include "cocoa_v.h" #include "cocoa_keys.h" @@ -653,6 +654,10 @@ static bool QZ_PollEvent() } else if ([ event deltaY ] < 0.0) { /* Scroll down */ _cursor.wheel++; } /* else: deltaY was 0.0 and we don't want to do anything */ + + /* Set the scroll count for scrollwheel scrolling */ + _cursor.h_wheel -= (int)([ event deltaX ]* 5 * _patches.scrollwheel_multiplier); + _cursor.v_wheel -= (int)([ event deltaY ]* 5 * _patches.scrollwheel_multiplier); break; default: -- cgit v1.2.3-70-g09d2