mirror of
https://github.com/wiiu-env/ScreenshotWUPS.git
synced 2024-11-25 15:26:53 +01:00
Fix button combo detection for WPAD controller
This commit is contained in:
parent
19034d1639
commit
7633e2eed9
@ -42,17 +42,18 @@ DECL_FUNCTION(void, WPADRead, WPADChan chan, WPADStatusProController *data) {
|
||||
if (data[0].extensionType == WPAD_EXT_CORE || data[0].extensionType == WPAD_EXT_NUNCHUK) {
|
||||
auto buttonCombo = remapVPADtoWiimote(gButtonCombo);
|
||||
// button data is in the first 2 bytes for wiimotes
|
||||
if (((uint16_t *) data)[0] == buttonCombo) {
|
||||
if (buttonCombo != 0 && ((uint16_t *) data)[0] == buttonCombo) {
|
||||
takeScreenshot = true;
|
||||
}
|
||||
} else if (data[0].extensionType == WPAD_EXT_CLASSIC) {
|
||||
auto buttonCombo = remapVPADtoClassic(gButtonCombo);
|
||||
if ((((uint32_t *) data)[10] & 0xFFFF) == buttonCombo) {
|
||||
if (buttonCombo != 0 && (((uint32_t *) data)[10] & 0xFFFF) == buttonCombo) {
|
||||
takeScreenshot = true;
|
||||
}
|
||||
} else if (data[0].extensionType == WPAD_EXT_PRO_CONTROLLER) {
|
||||
auto buttonCombo = remapVPADtoClassic(gButtonCombo);
|
||||
if (data[0].buttons == buttonCombo) {
|
||||
auto buttonCombo = remapVPADtoPro(gButtonCombo);
|
||||
|
||||
if (buttonCombo != 0 && data[0].buttons == buttonCombo) {
|
||||
takeScreenshot = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user