From d5a551482b1ce02e367a71f811482017895f5bdd Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Mon, 4 Sep 2023 02:04:42 +0200 Subject: [PATCH] idac: mapped left and right thumbstick to dpad left and right --- dist/idac/segatools.ini | 2 ++ idacio/xi.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/idac/segatools.ini b/dist/idac/segatools.ini index 2da93ef..a99f2f8 100644 --- a/dist/idac/segatools.ini +++ b/dist/idac/segatools.ini @@ -89,6 +89,8 @@ coin=0x33 mode=xinput [xinput] +; Left and right thumbsticks are mapped to left and right dpad buttons. +; Press both thumbsticks to trigger "Time Up" and exit the course. ; Automatically reset the simulated shifter to Neutral when XInput Start is ; pressed (e.g. when navigating menus between races). autoNeutral=1 diff --git a/idacio/xi.c b/idacio/xi.c index 918acad..b83aa9d 100644 --- a/idacio/xi.c +++ b/idacio/xi.c @@ -99,11 +99,11 @@ static void idac_xi_get_gamebtns(uint8_t *gamebtn_out) { gamebtn |= IDAC_IO_GAMEBTN_DOWN; } - if (xb & XINPUT_GAMEPAD_DPAD_LEFT) { + if (xb & (XINPUT_GAMEPAD_DPAD_LEFT | XINPUT_GAMEPAD_LEFT_THUMB)) { gamebtn |= IDAC_IO_GAMEBTN_LEFT; } - if (xb & XINPUT_GAMEPAD_DPAD_RIGHT) { + if (xb & (XINPUT_GAMEPAD_DPAD_RIGHT | XINPUT_GAMEPAD_RIGHT_THUMB)) { gamebtn |= IDAC_IO_GAMEBTN_RIGHT; }