• Daniel G. Morse's avatar
    HID: Wiimote: Treat the d-pad as an analogue stick · a8cbf80e
    Daniel G. Morse authored
    The controllers from the Super Nintendo Classic Edition (AKA the SNES
    Mini) appear as a Classic Controller Pro when connected to a Wii
    Remote. All the buttons work as the same, with the d-pad being mapped
    the same as the d-pad on the Classic Controller Pro. This differs from
    the behaviour of most controllers with d-pads and no analogue sticks,
    where the d-pad maps to ABS_HAT1X for left and right, and ABS_HAT1Y
    for up and down. This patch adds an option to the hid-wiimote module
    to make the Super Nintendo Classic Controller behave this way.
    
    The patch has been tested with a Super Nintendo Classic Controller
    plugged into a Wii Remote in both with the option both enabled and
    disabled. When enabled the d-pad acts as the analogue control, and
    when disabled it acts as it did before the patch was applied. This
    patch has not been tested with e Wii Classic Controller (either the
    original or the pro version) as I do not have one of these
    controllers.
    
    Although I have not tested it with these controllers, I think it is
    likely this patch will also work with the NES Classic Edition
    Controllers.
    Signed-off-by: default avatarDaniel G. Morse <dmorse@speedfox.co.uk>
    Reviewed-by: default avatarDavid Rheinsberg <david.rheinsberg@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    a8cbf80e
hid-wiimote-core.c 48.6 KB