{
if (strcmp(var.value, "standard") == 0)
in_type[0] = PSE_PAD_TYPE_STANDARD;
{
if (strcmp(var.value, "standard") == 0)
in_type[0] = PSE_PAD_TYPE_STANDARD;
else if (strcmp(var.value, "none") == 0)
in_type[0] = PSE_PAD_TYPE_NONE;
else // 'default' case
else if (strcmp(var.value, "none") == 0)
in_type[0] = PSE_PAD_TYPE_NONE;
else // 'default' case
- switch (device)
- {
- case RETRO_DEVICE_JOYPAD:
- in_type[port] = PSE_PAD_TYPE_STANDARD;
- break;
- case RETRO_DEVICE_ANALOG:
- in_type[port] = PSE_PAD_TYPE_ANALOGPAD;
- break;
- case RETRO_DEVICE_MOUSE:
- in_type[port] = PSE_PAD_TYPE_MOUSE;
- break;
- case RETRO_DEVICE_LIGHTGUN:
- in_type[port] = PSE_PAD_TYPE_GUN;
- break;
- case RETRO_DEVICE_NONE:
- default:
- in_type[port] = PSE_PAD_TYPE_NONE;
- }
+ case RETRO_DEVICE_JOYPAD:
+ in_type[port] = PSE_PAD_TYPE_STANDARD;
+ break;
+ case RETRO_DEVICE_ANALOG:
+ in_type[port] = PSE_PAD_TYPE_ANALOGPAD;
+ break;
+ case RETRO_DEVICE_MOUSE:
+ in_type[port] = PSE_PAD_TYPE_MOUSE;
+ break;
+ case RETRO_DEVICE_LIGHTGUN:
+ in_type[port] = PSE_PAD_TYPE_GUN;
+ break;
+ case RETRO_DEVICE_NONE:
+ default:
+ in_type[port] = PSE_PAD_TYPE_NONE;
{
if (strcmp(var.value, "enabled") == 0)
multitap1 = 1;
else if (strcmp(var.value, "disabled") == 0)
multitap1 = 0;
else // 'auto' case
{
if (strcmp(var.value, "enabled") == 0)
multitap1 = 1;
else if (strcmp(var.value, "disabled") == 0)
multitap1 = 0;
else // 'auto' case
- {
- // If a gamepad is plugged after port 2, we need a first multitap.
- multitap1 = 0;
- for (int port = 2; port < PORTS_NUMBER; port++)
- multitap1 |= in_type[port] != PSE_PAD_TYPE_NONE;
- }
+ auto_case = 1;
+ }
+ else
+ auto_case == 1;
+
+ if (auto_case)
+ {
+ // If a gamepad is plugged after port 2, we need a first multitap.
+ multitap1 = 0;
+ for (int port = 2; port < PORTS_NUMBER; port++)
+ multitap1 |= in_type[port] != PSE_PAD_TYPE_NONE;
{
if (strcmp(var.value, "enabled") == 0)
multitap2 = 1;
else if (strcmp(var.value, "disabled") == 0)
multitap2 = 0;
else // 'auto' case
{
if (strcmp(var.value, "enabled") == 0)
multitap2 = 1;
else if (strcmp(var.value, "disabled") == 0)
multitap2 = 0;
else // 'auto' case
- {
- // If a gamepad is plugged after port 4, we need a second multitap.
- multitap2 = 0;
- for (int port = 4; port < PORTS_NUMBER; port++)
- multitap2 |= in_type[port] != PSE_PAD_TYPE_NONE;
- }
+ auto_case = 1;
+ }
+ else
+ auto_case == 1;
+
+ if (auto_case)
+ {
+ // If a gamepad is plugged after port 4, we need a second multitap.
+ multitap2 = 0;
+ for (int port = 4; port < PORTS_NUMBER; port++)
+ multitap2 |= in_type[port] != PSE_PAD_TYPE_NONE;