mirror of https://github.com/stella-emu/stella.git
fixed jittering driving controller when using keyboard
This commit is contained in:
parent
74a3b42903
commit
1f2e9bbb28
|
@ -114,7 +114,7 @@ void Driving::updateControllerAxes()
|
||||||
{
|
{
|
||||||
// Digital events (from keyboard or joystick hats & buttons)
|
// Digital events (from keyboard or joystick hats & buttons)
|
||||||
const int d_axis = myEvent.get(myXAxisValue);
|
const int d_axis = myEvent.get(myXAxisValue);
|
||||||
uInt32 oldCounterHires = myCounterHires;
|
const Int32 oldCounterHires = myCounterHires;
|
||||||
|
|
||||||
if(myEvent.get(myCCWEvent) != 0 && myLastCCWEvent == 0)
|
if(myEvent.get(myCCWEvent) != 0 && myLastCCWEvent == 0)
|
||||||
myCounterHires = ((myGrayIndex + 4) * 256.0F) / SENSITIVITY - 1; // set to end of previous counter interval
|
myCounterHires = ((myGrayIndex + 4) * 256.0F) / SENSITIVITY - 1; // set to end of previous counter interval
|
||||||
|
|
|
@ -95,7 +95,7 @@ class Driving : public Controller
|
||||||
Int32 myCounter{0};
|
Int32 myCounter{0};
|
||||||
|
|
||||||
// Higher resolution counter for analog (non-Stelladaptor) inputs
|
// Higher resolution counter for analog (non-Stelladaptor) inputs
|
||||||
uInt32 myCounterHires{0};
|
Int32 myCounterHires{0};
|
||||||
|
|
||||||
// Previous digital CCW event
|
// Previous digital CCW event
|
||||||
Int32 myLastCCWEvent{0};
|
Int32 myLastCCWEvent{0};
|
||||||
|
|
Loading…
Reference in New Issue