mirror of https://github.com/encounter/SDL.git
Use the Nintendo controller type to determine whether to always use button labels
This commit is contained in:
parent
946f4777f6
commit
ba297f12cd
|
@ -326,16 +326,15 @@ static SDL_bool
|
||||||
AlwaysUsesLabels(int vendor_id, int product_id, ESwitchDeviceInfoControllerType eControllerType)
|
AlwaysUsesLabels(int vendor_id, int product_id, ESwitchDeviceInfoControllerType eControllerType)
|
||||||
{
|
{
|
||||||
/* These controllers don't have a diamond button configuration, so always use labels */
|
/* These controllers don't have a diamond button configuration, so always use labels */
|
||||||
if (vendor_id == USB_VENDOR_NINTENDO &&
|
switch (eControllerType) {
|
||||||
(product_id == USB_PRODUCT_NINTENDO_N64_CONTROLLER ||
|
case k_eSwitchDeviceInfoControllerType_NESLeft:
|
||||||
product_id == USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER)) {
|
case k_eSwitchDeviceInfoControllerType_NESRight:
|
||||||
|
case k_eSwitchDeviceInfoControllerType_N64:
|
||||||
|
case k_eSwitchDeviceInfoControllerType_SEGA_Genesis:
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
default:
|
||||||
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
if (eControllerType == k_eSwitchDeviceInfoControllerType_NESLeft ||
|
|
||||||
eControllerType == k_eSwitchDeviceInfoControllerType_NESRight) {
|
|
||||||
return SDL_TRUE;
|
|
||||||
}
|
|
||||||
return SDL_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_bool
|
static SDL_bool
|
||||||
|
|
Loading…
Reference in New Issue