Advertisement

gamepad keybinding

Started by February 01, 2006 02:31 PM
0 comments, last by matt_j 19 years ago
having trouble trying to bind keys on a gamepad, Im using a wrapper for DirectInput and I have enums for all the buttons on the gamepad and yeha. So im thinking I just have a for loop to go through all the keys that are possible to hit, but the trouble Im having is all my input functions are done through DIKs so im not quite sure on how I would approach this
In my engine, if a key is pressed, the scan code or whatever Windows uses is processed by my engine. What I did was have SDL poll the joypads, and I return a number equal to 256+which_joypad*16+button, and I have a similar system for the mouse. It's kind of like a "scan code" for the joystick buttons.

This topic is closed to new replies.

Advertisement