From 4665b9b268278e695cd17a97300e0420fa52c55f Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 22 Dec 2002 13:04:10 +0000 Subject: [PATCH] Fixed button pressed masks Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@589 --- src/hardware/joystick.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/joystick.cpp b/src/hardware/joystick.cpp index a5bd7f88..f99aea0b 100644 --- a/src/hardware/joystick.cpp +++ b/src/hardware/joystick.cpp @@ -46,14 +46,14 @@ static Bit8u read_p201(Bit32u port) { if (stick[0].enabled) { if (stick[0].xcount) stick[0].xcount--; else ret&=~1; if (stick[0].ycount) stick[0].ycount--; else ret&=~2; - if (stick[0].button[0]) ret&=16; - if (stick[0].button[1]) ret&=32; + if (stick[0].button[0]) ret&=~16; + if (stick[0].button[1]) ret&=~32; } if (stick[1].enabled) { if (stick[1].xcount) stick[1].xcount--; else ret&=~4; if (stick[1].ycount) stick[1].ycount--; else ret&=~8; - if (stick[1].button[0]) ret&=64; - if (stick[1].button[1]) ret&=128; + if (stick[1].button[0]) ret&=~64; + if (stick[1].button[1]) ret&=~128; } return ret; }