Move the "No joystick" option to the top and get rid of the JOYSTICK_TYPE_NONE macro

This commit is contained in:
Alexander Babikov
2020-12-04 22:05:26 +05:00
parent ddf85533aa
commit 82404f2b3a
16 changed files with 30 additions and 31 deletions

View File

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

View File

@@ -74,7 +74,7 @@ machine_at_common_init_ex(const machine_t *model, int type)
else if (type == 0)
device_add(&at_nvr_device);
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
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 != JOYSTICK_TYPE_NONE)
} else if (joystick_type)
b |= 0x02; /* enable port as joysticks */
sys->nvr.regs[MRTC_CONF_C] = b;

View File

@@ -517,7 +517,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 != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_201_device);
}

View File

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

View File

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

View File

@@ -56,7 +56,7 @@ machine_xt_compaq_deskpro_init(const machine_t *model)
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
nmi_init();
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_device);
lpt1_remove();
@@ -85,7 +85,7 @@ machine_xt_compaq_portable_init(const machine_t *model)
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
nmi_init();
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
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 != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_device);
laserxt_init(1);

View File

@@ -717,7 +717,7 @@ machine_xt_olim24_init(const machine_t *model)
/* FIXME: make sure this is correct?? */
device_add(&at_nvr_device);
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_device);
nmi_init();
@@ -760,7 +760,7 @@ machine_xt_olim240_init(const machine_t *model)
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_device);
nmi_init();
@@ -833,7 +833,7 @@ machine_xt_olim15_init(const machine_t *model)
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_device);
if (joystick_type != JOYSTICK_TYPE_NONE)
if (joystick_type)
device_add(&gameport_device);
nmi_init();

View File

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