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 | |
| 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')
| -rw-r--r-- | Source/Makefile | 2 | ||||
| -rw-r--r-- | Source/Pad.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Source/Makefile b/Source/Makefile index 7393dd1..5b49052 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -22,7 +22,7 @@ PATH := $(PATH):$(PSXSDK_PATH)/bin/ PROJECT_DIR = ~/$(PROJECT) #Uncomment this DEFINE below to use Airport together with OpenSend + QPSXSerial toolchain. -#DEFINE += -DSERIAL_INTERFACE +DEFINE += -DSERIAL_INTERFACE # PSXSDK tools definitions # ELF2EXE: 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) |
