Assorted Joystick fixes
Implemented use of DirectInput sliders. They were previously lumped in with axis and then not read or used at all. Lots of use of joystick_type == 7 or joystick_type != 7 to detect if the joystick_type was none. Changed this to a define. The text to enumerate the types of joysticks was contained in a numbered LPARAM sheet. Switched to using the name listed in the joystick struct. Joysticks with more than 32 buttons would overflow the plat_joystick_state button array. Added overflow checks. Added a 4 axis 4 button joystick type that Win98 can pick up as a generic 4 axis 4 button controller.
This commit is contained in:
@@ -90,6 +90,7 @@ static const joystick_if_t *joystick_list[] = {
|
||||
&joystick_standard_4button,
|
||||
&joystick_standard_6button,
|
||||
&joystick_standard_8button,
|
||||
&joystick_4axis_4button,
|
||||
&joystick_ch_flightstick_pro,
|
||||
&joystick_sw_pad,
|
||||
&joystick_tm_fcs,
|
||||
@@ -265,7 +266,7 @@ gameport_init(const device_t *info)
|
||||
{
|
||||
gameport_t *p = NULL;
|
||||
|
||||
if (joystick_type == 7) {
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) {
|
||||
p = NULL;
|
||||
return(p);
|
||||
}
|
||||
@@ -284,7 +285,7 @@ gameport_201_init(const device_t *info)
|
||||
{
|
||||
gameport_t *p;
|
||||
|
||||
if (joystick_type == 7) {
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) {
|
||||
p = NULL;
|
||||
return(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user