Potential bug with rawinput not working when no keyboard

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Potential bug with rawinput not working when no keyboard

Postby adamgp » Sun Jul 19, 2020 3:39 am

Hi, I have an issue whereby when using rawinput for the gun games to support dual guns on an arcade cabinet im building. Everything was working fine during setup until I unplugged my usb keyboard to deploy the cabinet suddenly the rawinput input system stopped working. As soon as i plug the keyboard back in and reload a game rawinput works again.

I can verify the input system as I have a JoyToKey button mapped to Alt-P for pausing which obviously doesnt work when rawinput is in affect. However if i unplug the keyboard and reload, the gun cursors no longer work and I can still via my mapped button.

The error logs shows nothing of interest other than that the InputSystem is in fact rawinput when it clearly cannot be!?

I can only assume rawinput must fallback to dinput/SDL in the event no keyboard device is detected? Or perhaps as ive left in some default KEY_ bindings in the config file and there is no keyboard...

Any help would be greatly appreciated!

Thank you
adamgp
 
Posts: 3
Joined: Mon Oct 21, 2019 2:02 am

Re: Potential bug with rawinput not working when no keyboard

Postby adamgp » Fri Jul 24, 2020 1:53 am

Please see the attached bug with detection on rawinput as an input-system.

In the file: OSD\Windows\DirectInputSystem.cpp @ line 661 (r807) m_useRawInput is set to false if at least one keyboard and one mouse cannot be found.
Ideally, this should be an OR operation not AND, as a keyboard is not necessary and keyboard actions can be invoked with gamepad button remapping.

Is it possible to change this to allow rawinput to operate even if m_rawKeyboards.size() is zero?
Thank you
Attachments
Capture.JPG
Capture.JPG (46.74 KiB) Viewed 45 times
adamgp
 
Posts: 3
Joined: Mon Oct 21, 2019 2:02 am


Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 1 guest