summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Derrick Renaud <derrickr@mamedev.org>2009-04-13 02:32:38 +0000
committer Derrick Renaud <derrickr@mamedev.org>2009-04-13 02:32:38 +0000
commit7242193ea02736f3d536189d1758c6e23fab65ef (patch)
tree1e7d9ca5d833bbf155ce7d649c8c648de7226cb9
parenta97a3f416fd1ac4d87899e19b832fbeed336d297 (diff)
Fixed an auto-center bug on analog joysticks that I added during a cleanup.
-rw-r--r--src/emu/inptport.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index 5d55b8f5c31..ec95895acc7 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -2225,7 +2225,7 @@ static void frame_update_analog_field(analog_field_state *analog)
if (analog->autocenter)
{
INT32 center = APPLY_INVERSE_SENSITIVITY(analog->center, analog->sensitivity);
- if (!analog->lastdigital && !keypressed)
+ if (analog->lastdigital && !keypressed)
{
/* autocenter from positive values */
if (analog->accum >= center)
@@ -2250,8 +2250,7 @@ static void frame_update_analog_field(analog_field_state *analog)
}
}
}
-
- if (!keypressed)
+ else if (!keypressed)
analog->lastdigital = FALSE;
}