-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add driver for generic HID joysticks/gamepads #26
Conversation
|
Thanks for hgame driver. Could you rework it without using callbacks? Although currently callbacks look better, there are plans to implement HID usage ranges and scatter-gather maps for such a drivers |
Also add comment about testing on an XBox 360/XInput compatible gamepad.
Using the direct number mapping with our custom descriptor results in buttons being wrong. For now, match using Microsoft vendor.
|
|
Merged, thanx
Callbacks were added for things like this one, They should be used if translation can not be written in declarative way.
May be create hgame.h with required constants? |
I mean how would I pass the info between drivers.. I guess via |
|
Yes, hid_device_info is intended to pass information between layers. Do you want place quirks here too? |
|
Yeah, I guess. (I specifically need to pass a USB-level match to a HID driver) |
|
Other way is a global function that compares |
Tested on an off-brand cheap USB gamepad with <16 buttons :D but I'm relatively confident in the lots-of-buttons (
BTN_TRIGGER_HAPPY) support code.The list of individual buttons in
struct hmap_item[]sucks, would be nice to have a.usage_maskinstead of.usagethat would allow me to match allHUP_BUTTONs…