necroware / gameport-adapter

GamePort adapter to connect old DB15 joysticks to USB port
GNU General Public License v3.0
297 stars 57 forks source link

Button inputs inverted wit Kraft KC3 #62

Open jurassicjordan opened 1 year ago

jurassicjordan commented 1 year ago

buttons appear as being pressed when released and released when pressed

Rikki-Tikki-Tavi-12 commented 7 months ago

Find this function in HidJoystick.h:

byte getButtons() {
  return m_button1.isLow() | m_button2.isLow() << 1 | m_button3.isLow() << 2 | m_button4.isLow() << 3;
}

Replace with

byte getButtons() {
  return m_button1.isHigh() | m_button2.isHigh() << 1 | m_button3.isHigh() << 2 | m_button4.isHigh() << 3;
}