Joystick fix from Dave Schmenk - correctly read joystick values even when it's not in motion.

This commit is contained in:
David Schmidt 2013-09-10 20:47:42 +00:00
parent 0093780eda
commit b7885c4e2a
2 changed files with 8 additions and 4 deletions

View File

@ -22,6 +22,9 @@ GSport Release History
* Fixed crash when parallel.rom is missing
* Fix for real joysticks: unless the joystick is moving, gsport
sets the values to zero.
[]

View File

@ -1,6 +1,6 @@
/*
GSport - an Apple //gs Emulator
Copyright (C) 2010 by GSport contributors
Copyright (C) 2010 - 2013 by GSport contributors
Based on the KEGS emulator written by and Copyright (C) 2003 Kent Dickey
@ -39,7 +39,7 @@ extern int g_paddle_buttons;
extern int g_paddle_val[];
const char *g_joystick_dev = "/dev/js0"; /* default joystick dev file */
const char *g_joystick_dev = "/dev/input/js0"; /* default joystick dev file */
#define MAX_JOY_NAME 128
int g_joystick_native_fd = -1;
@ -128,9 +128,10 @@ joystick_update(double dcycs)
}
}
if(i > 0) {
// if(i > 0) {
// Note from Dave Schmenk: paddle_update_trigger_dcycles(dcycs) always has to be called to keep the triggers current.
paddle_update_trigger_dcycs(dcycs);
}
// }
}
void