mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 04:39:17 +01:00
Make sure the extensionType is valid before usin KPADData in the config menu
This commit is contained in:
parent
edf06a5ee8
commit
5da5c0e117
@ -172,7 +172,7 @@ void ConfigUtils::displayMenu() {
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (KPADReadEx((KPADChan) i, &kpad_data, 1, &kpad_error) > 0) {
|
||||
if (kpad_error == KPAD_ERROR_OK) {
|
||||
if (kpad_error == KPAD_ERROR_OK && kpad_data.extensionType != 0xFF) {
|
||||
if (kpad_data.extensionType == WPAD_EXT_CORE || kpad_data.extensionType == WPAD_EXT_NUNCHUK) {
|
||||
buttonsTriggered |= remapWiiMoteButtons(kpad_data.trigger);
|
||||
buttonsReleased |= remapWiiMoteButtons(kpad_data.release);
|
||||
|
Loading…
Reference in New Issue
Block a user