From 6470f164475252634f439713d684cd23a7cb67c7 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Wed, 4 Sep 2002 21:49:22 +0000 Subject: [PATCH] Fixed bug with joystick always going down. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@258 --- 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 3193d53b..b0c03ef7 100644 --- a/src/hardware/joystick.cpp +++ b/src/hardware/joystick.cpp @@ -60,12 +60,12 @@ static Bit8u read_p201(Bit32u port) { static void write_p201(Bit32u port,Bit8u val) { if (stick[0].enabled) { - stick[0].xcount=(Bitu)(stick[0].xpos*RANGE+RANGE*2); - stick[0].ycount=(Bitu)(stick[0].ypos*RANGE+RANGE*2); + stick[0].xcount=(Bitu)((stick[0].xpos*RANGE)+RANGE); + stick[0].ycount=(Bitu)((stick[0].ypos*RANGE)+RANGE); } if (stick[1].enabled) { - stick[1].xcount=(Bitu)(stick[1].xpos*RANGE+RANGE*2); - stick[1].ycount=(Bitu)(stick[1].ypos*RANGE+RANGE*2); + stick[1].xcount=(Bitu)((stick[1].xpos*RANGE)+RANGE); + stick[1].ycount=(Bitu)((stick[1].ypos*RANGE)+RANGE); } }