- summary: Gradient motion --> Gradient motion (Joymouse)
I don't have visual C or I'd try adding this myself,
but with a very simple code addition I think you can
allow support for joysticks with gradient motion, so
that the further you push the joystick, the faster the
cursor moves.
In function RefreshState(), just before updating cursor
pos:
// multiply by the fraction of the max
if(g_allow_gradient) // add a checkbox?
{
mult = mult * (ji.dwXpos - dwXmid) / (ji.wXmax - dwXmid);
}
Of course variables would have to be doubles in this case.
Since the cursor position is required to be an integer,
this will still only produce binary results, but you
can get by this by having your own static double
variables for the cursor's x and y, that you round just
before updating the position.
That would ROCK HARD CORE.
Great job! I use my gamepad to get around now (less
cramps).
Jack