From 78cb524bcf8e78b65205b0c2d80f73748a998712 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 15 Apr 2013 18:37:24 +0200 Subject: [PATCH] Fixed bug in getButtonPress --- XBOXRECV.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBOXRECV.cpp b/XBOXRECV.cpp index 572cde76..7686c184 100644 --- a/XBOXRECV.cpp +++ b/XBOXRECV.cpp @@ -386,7 +386,7 @@ uint8_t XBOXRECV::getButtonPress(uint8_t controller, Button b) { return (uint8_t)(ButtonState[controller] >> 8); else if (b == R2) return (uint8_t)ButtonState[controller]; - return (ButtonState[controller] & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16)); + return (bool)(ButtonState[controller] & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16)); } bool XBOXRECV::getButtonClick(uint8_t controller, Button b) {