mirror of
https://github.com/polpo/picogus.git
synced 2026-10-25 21:40:16 +00:00
Fix bool option setting and add xinput driver install callback
This commit is contained in:
1 parent
afd68487c1
commit
6a7c1eb50a
2 files changed
+6
-1
No files matched your search
+1
-1
@@ -366,7 +366,7 @@ if (e != 1) { \
|
||||
usage(argv[0], mode, false); \
|
||||
return 5; \
|
||||
} \
|
||||
option = (tmp_arg[0] == 1) ? 1 : 0;
|
||||
option = (tmp_arg[0] == '1') ? 1 : 0;
|
||||
|
||||
|
||||
#define process_port_opt(option) \
|
||||
|
||||
@@ -335,6 +335,11 @@ void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t cons
|
||||
}
|
||||
|
||||
#ifdef USB_JOYSTICK
|
||||
usbh_class_driver_t const* usbh_app_driver_get_cb(uint8_t* driver_count) {
|
||||
*driver_count = 1;
|
||||
return &usbh_xinput_driver;
|
||||
}
|
||||
|
||||
static inline void update_joystate_xinput(uint16_t wButtons, int16_t sThumbLX, int16_t sThumbLY, int16_t sThumbRX, int16_t sThumbRY, uint8_t bLeftTrigger, uint8_t bRightTrigger) {
|
||||
uint8_t dpad = wButtons & 0xf;
|
||||
if (!dpad) {
|
||||
|
||||
Reference in new issue
Block a user