1
1
/* -----------------------------------------------------------------
2
2
* MouseFix
3
3
*
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.
5
7
*
6
8
* A program to disable/adjust the annoying mouse acceleration on Mac OS-X
7
9
*
52
54
*
53
55
* This value should always be positive
54
56
*/
55
- static float accel_factor = 1 .0 ;
57
+ static float accel_factor = 2 .0 ;
56
58
57
59
/* Setting this value to '1' will enable use of the scaling table
58
60
* Setting this value to '0' will disable use of the scaling table and
59
61
* the values set for it shall be ignored
60
62
*/
61
- #define USE_SCALING_TABLE (0 )
63
+ #define USE_SCALING_TABLE (1 )
62
64
63
65
/* Scaling table. This controls the scaling relationship between mouse
64
66
* movement and screen cursor movement
@@ -120,7 +122,7 @@ static const short scale[][2] =
120
122
* 0 - OK - Mouse movement adjusted
121
123
* 1 - Failed
122
124
*/
123
- int main (int argc , char * * argv )
125
+ int main (int argc , const char * * argv )
124
126
{
125
127
int fail = 0 ;
126
128
@@ -144,8 +146,8 @@ int main(int argc, char** argv)
144
146
" resulting in a simple, scaled linear mouse / cursor\n"
145
147
" relationship (which, if you are using this, is\n"
146
148
" 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"
149
151
"table, you will need to adjust the configuration in the code and\n"
150
152
"recompile\n\n" );
151
153
fail = 1 ;
@@ -186,7 +188,7 @@ int main(int argc, char** argv)
186
188
ms .scaleFactors [x ] = scale [x ][1 ];
187
189
}
188
190
189
- NXSetMouseScaling (evs , & ms );
191
+ IOHIDSetMouseAcceleration (evs , & ms );
190
192
}
191
193
else
192
194
{
@@ -197,7 +199,7 @@ int main(int argc, char** argv)
197
199
#else
198
200
/* Disable the mouse scaling table */
199
201
ms .numScaleLevels = 0 ;
200
- NXSetMouseScaling (evs , & ms );
202
+ IOHIDSetMouseAcceleration (evs , & ms );
201
203
#endif
202
204
203
205
/* Tidy up */
0 commit comments