Bug 3206 - Mouse Acceleration in Mac OS X
Status: RESOLVED FIXED
Alias:
Product: ioquake3
Classification: Unclassified
Component: Platform
Version: unspecified
Hardware: Macintosh MacOS X
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL: http://www.promode.org
Depends on:
Blocks:
 
Reported: 2007-06-05 20:18 EDT by kevin mcquillan
Modified: 2007-07-28 23:38:10 EDT
0 users

See Also:


Attachments
Allows clients to disable mouse acceleration in Mac OS X (121.50 KB, patch)
2007-06-18 21:27 EDT, kevin mcquillan
fixed (4.77 KB, patch)
2007-07-08 15:29 EDT, kevin mcquillan

Description kevin mcquillan 2007-06-05 20:18:05 EDT
Many quake 3 players and gamers in general prefer to disable mouse acceleration while playing computer games.  On Windows machines this can be carried out using the CPL mouse fix.  There is no such fix for macintosh machines, however, the developers of NEXUIZ (a standalone fps based on the quakeworld engine, #nexuiz on qnet) used code snippits from http://svn.icculus.org/twilight/trunk/darkplaces/vid_agl.c?rev=7316&view=markup to temporarly disable mouse acceleration while playing quake 3.  This feature would be greatly appreciated in quake 3 as well.
Comment 1 kevin mcquillan 2007-06-05 20:31:21 EDT
CPL mouse fix can be found here http://www.gotfrag.com/portal/files/82/
Comment 2 kevin mcquillan 2007-06-18 21:27:10 EDT
Created attachment 1416 [details]
Allows clients to disable mouse acceleration in Mac OS X

Used http://svn.icculus.org/twilight/trunk/darkplaces/vid_agl.c?r1=7295&r2=7316&p1=trunk/darkplaces/vid_agl.c&p2=trunk/darkplaces/vid_agl.c
Comment 3 kevin mcquillan 2007-06-18 21:29:41 EDT
Using http://svn.icculus.org/twilight/trunk/darkplaces/vid_agl.c?r1=7295&r2=7316&p1=trunk/darkplaces/vid_agl.c&p2=trunk/darkplaces/vid_agl.c I was able to create a way for clients using MAC OS X to disable mouse acceleration present within the OS
Comment 4 kevin mcquillan 2007-06-18 21:32:28 EDT
OOPS! in Lines 1357-1362 i misspelled ARCHIVE, my bad :(

other then that it should be fine 

Comment 5 Zachary J. Slater 2007-06-27 18:19:49 EDT
Please see:
http://bugzilla.libsdl.org/show_bug.cgi?id=445
Comment 6 Zachary J. Slater 2007-06-27 18:20:47 EDT
We will probably add a TEMPORARY FIX using your patch ONCE IT IS CLEANED UP TO NOT INCLUDE RIDICULOUS MAKEFILE CHANGES, thx2u.
Comment 7 kevin mcquillan 2007-06-27 19:33:46 EDT
well i made only one change in the make file, and that was to add -framework IOKit which is required for the actual fix, not sure why the diff makes it look so out of hand.. sorry...

under "setup and build - mac os x"

ifeq ($(USE_SDL),1)
+    BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 -D_THREAD_SAFE=1 \
+      -I$(SDLHDIR)/include
+    GL_CFLAGS =
+    # We copy sdlmain before ranlib'ing it so that subversion doesn't think
+    #  the file has been modified by each build.
+    LIBSDLMAIN=$(B)/libSDLmain.a
+    LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a
+    # We import the IOKit for Mac OS X mouse acceleration.
+    CLIENT_LDFLAGS += -framework Cocoa -framework IOKit -framework OpenGL \
+      $(LIBSDIR)/macosx/libSDL-1.2.0.dylib
+  else
+    # !!! FIXME: frameworks: OpenGL, Carbon, etc...
+    #CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm
+  endif
Comment 8 kevin mcquillan 2007-07-08 15:29:40 EDT
Created attachment 1434 [details]
fixed

corrected typos and problems
Comment 9 Zachary J. Slater 2007-07-08 21:11:26 EDT
Applied, resolved.
Please test that the current svn, WITHOUT MODIFICATION, works fine, then close the bug.
Comment 10 Ben Millwood 2007-07-28 22:23:16 EDT
Although I don't have ioquake3, I play Tremulous which is based on it, and recently merged this patch into its source. Since then, I have found it incredibly difficult to navigate menus as my mouse crawls along the screen at a snail's pace. Had I not been informed of and searched for this patch, I would have assumed this was the introduction, rather than a fix, of a bug. Disabling the new cvar restores mosue behaviour to normal

Assuming this is the normal behaviour, I think either the mouse speed with this cvar on should be enhanced, or the cvar should default to off so players are not caught by unexpected behaviour.

I realise that this is not the most helpful comment given that I can't be sure the problem even occurs in ioq3 rather than just Tremulous, but I felt the need to point it out.
Comment 11 kevin mcquillan 2007-07-28 23:38:10 EDT
Since the bug disables mouse acceleration, your mouse sensitivity may seem very very different if you are used to using mouse acceleration, hence this cvar can be disabled... if you would like to play with no mouse acceleration i suggest turning up the sensitivity of your mouse in the Macintosh Mouse Preferences (you may be suprised at how low it is by default!)