Merge pull request #553 from horkthane/feature/joystick_fixes

Assorted Joystick fixes
This commit is contained in:
OBattler
2020-01-17 15:59:06 +01:00
committed by GitHub
20 changed files with 151 additions and 51 deletions

View File

@@ -2508,7 +2508,7 @@ machine_amstrad_init(const machine_t *model, int type)
mouse_set_poll(ms_poll, ams);
}
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
}

View File

@@ -72,7 +72,7 @@ machine_at_common_init_ex(const machine_t *model, int type)
else if (type == 0)
device_add(&at_nvr_device);
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
}

View File

@@ -615,7 +615,7 @@ europc_boot(const device_t *info)
mouse_bus_set_irq(sys->mouse, 2);
/* Configure the port for (Bus Mouse Compatible) Mouse. */
b |= 0x01;
} else if (joystick_type != 7)
} else if (joystick_type != JOYSTICK_TYPE_NONE)
b |= 0x02; /* enable port as joysticks */
sys->nvr.regs[MRTC_CONF_C] = b;

View File

@@ -892,7 +892,7 @@ machine_olim24_init(const machine_t *model)
keyboard_set_table(scancode_xt);
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
/* FIXME: make sure this is correct?? */

View File

@@ -525,7 +525,7 @@ ps1_common_init(const machine_t *model)
device_add(&keyboard_ps2_ps1_device);
/* Audio uses ports 200h and 202-207h, so only initialize gameport on 201h. */
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_201_device);
}

View File

@@ -1527,7 +1527,7 @@ machine_tandy1k_init(const machine_t *model, int type)
device_add(&eep_1000sl2_device);
}
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
eep_data_out = 0x0000;

View File

@@ -26,7 +26,7 @@ machine_xt_common_init(const machine_t *model)
device_add(&fdc_xt_device);
nmi_init();
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
}

View File

@@ -55,7 +55,7 @@ machine_xt_compaq_init(const machine_t *model)
device_add(&keyboard_xt_compaq_device);
device_add(&fdc_xt_device);
nmi_init();
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
lpt1_remove();

View File

@@ -171,7 +171,7 @@ machine_xt_lxt3_init(const machine_t *model)
device_add(&keyboard_xt_lxt3_device);
device_add(&fdc_xt_device);
nmi_init();
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
laserxt_init(1);

View File

@@ -175,7 +175,7 @@ machine_xt_xi8088_init(const machine_t *model)
nmi_init();
device_add(&ibmat_nvr_device);
pic2_init();
if (joystick_type != 7)
if (joystick_type != JOYSTICK_TYPE_NONE)
device_add(&gameport_device);
return ret;