[Wii] fixed Wii U Pro Controller detection using libogc

This commit is contained in:
EkeEke 2018-08-11 01:28:12 +02:00
parent 7af5a0cdf4
commit 3ec4b627e8
4 changed files with 9 additions and 7 deletions

View File

@ -3,7 +3,7 @@
* *
* Genesis Plus GX menu * Genesis Plus GX menu
* *
* Copyright Eke-Eke (2009-2017) * Copyright Eke-Eke (2009-2018)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met:
@ -2859,7 +2859,8 @@ static void ctrlmenu(void)
if (exp == WPAD_EXP_CLASSIC) if (exp == WPAD_EXP_CLASSIC)
{ {
WPADData *data = WPAD_Data(config.input[player].port); WPADData *data = WPAD_Data(config.input[player].port);
exp = data->exp.classic.rjs.max.x; if (data->exp.classic.type == 2)
exp = 255;
} }
/* try next port if no wimote available */ /* try next port if no wimote available */

View File

@ -3,7 +3,7 @@
* *
* Genesis Plus GX menus * Genesis Plus GX menus
* *
* Copyright Eke-Eke (2009-2017) * Copyright Eke-Eke (2009-2018)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met:

View File

@ -3,7 +3,7 @@
* *
* Genesis Plus GX input support * Genesis Plus GX input support
* *
* Copyright Eke-Eke (2007-2017) * Copyright Eke-Eke (2007-2018)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met:
@ -1284,7 +1284,7 @@ int gx_input_FindDevices(void)
if (wpad == WPAD_EXP_CLASSIC) if (wpad == WPAD_EXP_CLASSIC)
{ {
WPADData *data = WPAD_Data(config.input[player].port); WPADData *data = WPAD_Data(config.input[player].port);
if (data->exp.classic.rjs.max.x != 255) if (data->exp.classic.type != 2)
{ {
found++; found++;
} }
@ -1453,11 +1453,12 @@ void gx_input_SetDefault(void)
{ {
/* make sure this is not a Wii U Pro Controller */ /* make sure this is not a Wii U Pro Controller */
WPADData *data = WPAD_Data(config.input[j].port); WPADData *data = WPAD_Data(config.input[j].port);
if (data->exp.classic.rjs.max.x != 255) if (data->exp.classic.type != 2)
{ {
/* Wiimote is available */ /* Wiimote is available */
config.input[i].device = 1; config.input[i].device = 1;
config.input[i].port = j; config.input[i].port = j;
break;
} }
} }
} }

View File

@ -3,7 +3,7 @@
* *
* Genesis Plus GX input support * Genesis Plus GX input support
* *
* Copyright Eke-Eke (2007-2017) * Copyright Eke-Eke (2007-2018)
* *
* Redistribution and use of this code or any derivative works are permitted * Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: * provided that the following conditions are met: