From b76dd913caaa243215cfeca93cc3aca449b0cdb9 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Thu, 31 Oct 2013 00:48:09 +0100 Subject: [PATCH] Forgot cast in getButtonPress --- XBOXUSB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBOXUSB.cpp b/XBOXUSB.cpp index 1b195f70..21b9d18e 100644 --- a/XBOXUSB.cpp +++ b/XBOXUSB.cpp @@ -282,7 +282,7 @@ uint8_t XBOXUSB::getButtonPress(Button b) { return (uint8_t)(ButtonState >> 8); else if (b == R2) return (uint8_t)ButtonState; - return (ButtonState & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16)); + return (bool)(ButtonState & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16)); } bool XBOXUSB::getButtonClick(Button b) {