04-09-2023, 01:17 AM
Ok, here's a situation I'm dealing with.
Over the past week I have gathered up steering wheels, joysticks, game pads, gas/brake pedals, flight yokes, and rudder pedals to test out a controller driver I'm writing in QB64. Most of the devices map buttons and axis with no issues. My joystick has 6 buttons and QB64 reports that it has 6 buttons. It has 4 axis, the joystick itself and a top hat, and again QB64 reports 4 axis. However, a few of my game pads inform QB64 (and the OS) that they have more buttons than they actually do.
The worst offender is a Nintendo clone look-a-like controller. It has 4 buttons (A, B, Select, and Start) but reports to QB64 that it has 10 buttons (it also reports 10 buttons to Windows). What's really weird is the A button is #2, the B button is #3, the Select button is #9, and the start button is #10. No logic to the ordering at all.
Sure, it would be easy enough to ask the player to press buttons to identify which are actually active (functionality I have already written into the driver and works well). However, does anyone know how I might go about identifying active buttons without actually having to have the user identify them by pressing them?
Over the past week I have gathered up steering wheels, joysticks, game pads, gas/brake pedals, flight yokes, and rudder pedals to test out a controller driver I'm writing in QB64. Most of the devices map buttons and axis with no issues. My joystick has 6 buttons and QB64 reports that it has 6 buttons. It has 4 axis, the joystick itself and a top hat, and again QB64 reports 4 axis. However, a few of my game pads inform QB64 (and the OS) that they have more buttons than they actually do.
The worst offender is a Nintendo clone look-a-like controller. It has 4 buttons (A, B, Select, and Start) but reports to QB64 that it has 10 buttons (it also reports 10 buttons to Windows). What's really weird is the A button is #2, the B button is #3, the Select button is #9, and the start button is #10. No logic to the ordering at all.
Sure, it would be easy enough to ask the player to press buttons to identify which are actually active (functionality I have already written into the driver and works well). However, does anyone know how I might go about identifying active buttons without actually having to have the user identify them by pressing them?