Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_BUTTON
#12
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?
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
_BUTTON - by TerryRitchie - 04-03-2023, 02:42 AM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 08:40 PM
RE: _BUTTON - by dbox - 04-03-2023, 11:07 PM
RE: _BUTTON - by TerryRitchie - 04-04-2023, 02:25 AM
RE: _BUTTON - by dbox - 04-04-2023, 03:34 AM
RE: _BUTTON - by SMcNeill - 04-03-2023, 09:03 PM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 09:16 PM
RE: _BUTTON - by SMcNeill - 04-03-2023, 09:04 PM
RE: _BUTTON - by TerryRitchie - 04-03-2023, 09:26 PM
RE: _BUTTON - by RhoSigma - 04-03-2023, 10:03 PM
RE: _BUTTON - by TerryRitchie - 04-04-2023, 02:24 AM
RE: _BUTTON - by TerryRitchie - 04-09-2023, 01:17 AM
RE: _BUTTON - by SMcNeill - 04-09-2023, 03:46 AM
RE: _BUTTON - by TerryRitchie - 04-09-2023, 05:12 AM



Users browsing this thread: 1 Guest(s)