fixed autofire for trackball using keyboard fire event

This commit is contained in:
Thomas Jentzsch 2020-08-04 12:08:43 +02:00
parent 3fa7dadcba
commit 7964c93a2f
1 changed files with 1 additions and 4 deletions

View File

@ -88,11 +88,8 @@ void PointingDevice::update()
updateDirection(-myEvent.get(Event::MouseAxisYMove), myVCounterRemainder,
myTrackBallDown, myTrackBallLinesV, myScanCountV, myFirstScanOffsetV);
// Digital events (from keyboard or joystick hats & buttons)
setPin(DigitalPin::Six, myEvent.get(Event::JoystickZeroFire) == 0);
// We allow left and right mouse buttons for fire button
setPin(DigitalPin::Six, !getAutoFireState(
setPin(DigitalPin::Six, !getAutoFireState(myEvent.get(Event::JoystickZeroFire) == 0 ||
myEvent.get(Event::MouseButtonLeftValue) || myEvent.get(Event::MouseButtonRightValue)));
}