Skip to content

Commit dbbdbd0

Browse files
committed
Previous commit didn't catch everything... oops. README and mousefix.c updated, mousefix for 10.6
1 parent 5e977a2 commit dbbdbd0

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
MouseFix
33
--------
44

5+
Version 1.2.1 - 19/09/2009
6+
7+
Updated mousefix so it will compile/run on 10.6 (Intel-only, sorry)
8+
- Allen "Chip" Parker - [email protected]
9+
510
Version 1.2 - 20/08/2006
611

712
Copyright (c) 2005 - Richard Bentley - [email protected]

make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
rm mousefix
23
cc mousefix.c -o mousefix /usr/lib/libIOKit.A.dylib
34
strip mousefix
45

mousefix.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* -----------------------------------------------------------------
22
* MouseFix
33
*
4-
* Version 1.2 - 20/08/2006
4+
* Version 1.2.1 - 19/09/2009
5+
*
6+
* Update for 10.6 IOKit, since NX* seem to be missing now.
57
*
68
* A program to disable/adjust the annoying mouse acceleration on Mac OS-X
79
*
@@ -52,13 +54,13 @@
5254
*
5355
* This value should always be positive
5456
*/
55-
static float accel_factor = 1.0;
57+
static float accel_factor = 2.0;
5658

5759
/* Setting this value to '1' will enable use of the scaling table
5860
* Setting this value to '0' will disable use of the scaling table and
5961
* the values set for it shall be ignored
6062
*/
61-
#define USE_SCALING_TABLE (0)
63+
#define USE_SCALING_TABLE (1)
6264

6365
/* Scaling table. This controls the scaling relationship between mouse
6466
* movement and screen cursor movement
@@ -120,7 +122,7 @@ static const short scale[][2] =
120122
* 0 - OK - Mouse movement adjusted
121123
* 1 - Failed
122124
*/
123-
int main(int argc, char** argv)
125+
int main(int argc, const char** argv)
124126
{
125127
int fail = 0;
126128

@@ -144,8 +146,8 @@ int main(int argc, char** argv)
144146
" resulting in a simple, scaled linear mouse / cursor\n"
145147
" relationship (which, if you are using this, is\n"
146148
" probably what you want)\n\n"
147-
"By default, the mouse scaling table is disabled, resulting in\n"
148-
"a linear mouse/cursor relationship. To use the mouse scaling\n"
149+
"By default, the mouse scaling table is enabled, resulting in\n"
150+
"a non-linear mouse/cursor relationship. To stop using the mouse scaling\n"
149151
"table, you will need to adjust the configuration in the code and\n"
150152
"recompile\n\n");
151153
fail = 1;
@@ -186,7 +188,7 @@ int main(int argc, char** argv)
186188
ms.scaleFactors[x] = scale[x][1];
187189
}
188190

189-
NXSetMouseScaling(evs, &ms);
191+
IOHIDSetMouseAcceleration(evs, &ms);
190192
}
191193
else
192194
{
@@ -197,7 +199,7 @@ int main(int argc, char** argv)
197199
#else
198200
/* Disable the mouse scaling table */
199201
ms.numScaleLevels = 0;
200-
NXSetMouseScaling(evs, &ms);
202+
IOHIDSetMouseAcceleration(evs, &ms);
201203
#endif
202204

203205
/* Tidy up */

0 commit comments

Comments
 (0)