src/video/cocoa_v.mm
branchcpp_gui
changeset 6303 84c215fc8eb8
parent 6298 c30fe89622df
--- a/src/video/cocoa_v.mm	Mon Mar 26 21:31:37 2007 +0000
+++ b/src/video/cocoa_v.mm	Mon Mar 26 22:15:38 2007 +0000
@@ -68,6 +68,7 @@
 #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 @@
 			} 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:
@@ -2042,22 +2047,6 @@
 	_cocoa_video_dialog = false;
 }
 
-
-/* This is needed since OS X applications are started with the working dir set to / when double-clicked */
-void cocoaSetWorkingDirectory()
-{
-	char parentdir[MAXPATHLEN];
-	int chdir_ret;
-	CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
-	CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
-	if (CFURLGetFileSystemRepresentation(url2, true, (unsigned char*)parentdir, MAXPATHLEN)) {
-		chdir_ret = chdir(parentdir); /* chdir to the binary app's parent */
-		assert(chdir_ret == 0);
-	}
-	CFRelease(url);
-	CFRelease(url2);
-}
-
 /* These are called from main() to prevent a _NSAutoreleaseNoPool error when
  * exiting before the cocoa video driver has been loaded
  */