Maschell / controller_patcher

shared files for hid support
42 stars 13 forks source link

Right stick: N/NE/E/SE/S/SW/W/NW ? #32

Open earithramir opened 5 years ago

earithramir commented 5 years ago

Hi, i'm currently trying to map a Gamecube USB clone controller. As the gamecube adapter (3th party) i coudn't get to function properly.

But the C-stick has 8 values: north, north-east, east, south-east, south, south-west, west, north-west. I'm trying to map this to the right stick but while looking through the source code i only find these options for the dpad? Is it possible to map a dpad with 8 directions (all on the same position, but that position also holds other buttons) to the right stick? Or do i need to configure it as dpad and use VPAD_R_STICK_COPY_DPAD ?

earithramir commented 5 years ago

example:

# Buttons
GC_BUTTON_A=0x05,0x2F
GC_BUTTON_B=0x05,0x4F
GC_BUTTON_X=0x05,0x1F
GC_BUTTON_Y=0x05,0x8F
GC_BUTTON_Z=0x06,0x80
GC_BUTTON_START=0x06,0x20
# C stick
C_STICK_N=0x05,0x1F
C_STICK_NE=0x05,0x3F
C_STICK_E=0x05,0x2F
C_STICK_SE=0x05,0x6F
C_STICK_S=0x05,0x4F
C_STICK_SW=0x05,0xCF
C_STICK_W=0x05,0x8F
C_STICK_NW=0x05,0x9F
C_STICK_DPAD_MODE=DPAD_HAT
# DPAD
# Left stick / D pad The L Stick is not analog and Dpad is mapped to the same buttons as L stick
GC_L_STICK_L_X=0x00,0x7F
GC_L_STICK_X_MINMAX=0x00,0xFF
GC_L_STICK_Y=0x01,0x7F
GC_L_STICK_Y_MINMAX=0x00,0xFF
GC_L_STICK_Y_INVERT=false
# Triggers The L and R triggers are not analog :(
GC_BUTTON_L=0x06,0x04
GC_BUTTON_R=0x06,0x08

I know these variables are non existing but i use the these to clarify which button is what..