diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-08-19 17:19:53 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-08-19 17:19:53 +0200 |
| commit | 0cfdfaf95927f0bc25d34744292c41d0d344c5e2 (patch) | |
| tree | ee4bf2802782d152adde51bd4ce3bb60688690a6 /Source/Pad.c | |
| parent | e778deb2c0c7fa2ce2d605dde7a5fe86a686e078 (diff) | |
| download | airport-0cfdfaf95927f0bc25d34744292c41d0d344c5e2.tar.gz | |
* (Bugfix): padx_last_key_single_pressed was being checked AFTER checking pads connected, so it was never calculated if, for example, pad 2 was disconnected. This was only reproducible under real hardware.
Diffstat (limited to 'Source/Pad.c')
| -rw-r--r-- | Source/Pad.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Pad.c b/Source/Pad.c index e68804b..8ea13dc 100644 --- a/Source/Pad.c +++ b/Source/Pad.c @@ -313,6 +313,7 @@ bool UpdatePads(void) { unsigned short adc_mouse; static unsigned short old_adc_mouse; + bool both_pads_connected = true; PadOneVibrationHandler(); @@ -344,12 +345,12 @@ bool UpdatePads(void) if(PadOneConnected() == false) { - return false; + both_pads_connected = false; } if(PadTwoConnected() == false) { - return false; + both_pads_connected = false; } if(!(previous_pad1 & pad1) ) @@ -370,7 +371,7 @@ bool UpdatePads(void) pad2_last_key_single_pressed = 0; } - return true; + return both_pads_connected; } bool PadOneKeyReleased(unsigned short key) |
