mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-20 20:46:02 +08:00
Added initial support for the Wii Motion Plus extension
This adds a gyro sensor to the Wii controller, and is enabled in standalone and nunchuk mode
This commit is contained in:
@@ -574,8 +574,7 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
|
||||
} else if (vendor == USB_VENDOR_NINTENDO &&
|
||||
guid.data[15] != k_eSwitchDeviceInfoControllerType_Unknown &&
|
||||
guid.data[15] != k_eSwitchDeviceInfoControllerType_ProController &&
|
||||
guid.data[15] != k_eWiiExtensionControllerType_ClassicController &&
|
||||
guid.data[15] != k_eWiiExtensionControllerType_ClassicControllerPro &&
|
||||
guid.data[15] != k_eWiiExtensionControllerType_Gamepad &&
|
||||
guid.data[15] != k_eWiiExtensionControllerType_WiiUPro) {
|
||||
switch (guid.data[15]) {
|
||||
case k_eSwitchDeviceInfoControllerType_NESLeft:
|
||||
@@ -594,7 +593,7 @@ static ControllerMapping_t *SDL_CreateMappingForHIDAPIController(SDL_JoystickGUI
|
||||
case k_eWiiExtensionControllerType_None:
|
||||
SDL_strlcat(mapping_string, "a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,start:b6,x:b2,y:b3,", sizeof(mapping_string));
|
||||
break;
|
||||
case k_eWiiExtensionControllerType_Nunchuck:
|
||||
case k_eWiiExtensionControllerType_Nunchuk:
|
||||
{
|
||||
/* FIXME: Should we map this to the left or right side? */
|
||||
const SDL_bool map_nunchuck_left_side = SDL_TRUE;
|
||||
|
||||
@@ -38,10 +38,9 @@ typedef enum {
|
||||
typedef enum {
|
||||
k_eWiiExtensionControllerType_Unknown = 0,
|
||||
k_eWiiExtensionControllerType_None = 128,
|
||||
k_eWiiExtensionControllerType_Nunchuck = 129,
|
||||
k_eWiiExtensionControllerType_ClassicController = 130,
|
||||
k_eWiiExtensionControllerType_ClassicControllerPro = 131,
|
||||
k_eWiiExtensionControllerType_WiiUPro = 132,
|
||||
k_eWiiExtensionControllerType_Nunchuk = 129,
|
||||
k_eWiiExtensionControllerType_Gamepad = 130,
|
||||
k_eWiiExtensionControllerType_WiiUPro = 131,
|
||||
} EWiiExtensionControllerType;
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user