mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-28 02:45:27 +01:00
[libretro] fixes port 2 control pad type configuration
This commit is contained in:
parent
ff2cb27f48
commit
8b909e4035
Binary file not shown.
@ -1687,23 +1687,41 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
|
|||||||
|
|
||||||
void retro_set_controller_port_device(unsigned port, unsigned device)
|
void retro_set_controller_port_device(unsigned port, unsigned device)
|
||||||
{
|
{
|
||||||
|
if (port > 2)
|
||||||
|
return;
|
||||||
|
|
||||||
switch(device)
|
switch(device)
|
||||||
{
|
{
|
||||||
case RETRO_DEVICE_NONE:
|
case RETRO_DEVICE_NONE:
|
||||||
input.system[port] = NO_SYSTEM;
|
input.system[port] = NO_SYSTEM;
|
||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_MDPAD_3B:
|
case RETRO_DEVICE_MDPAD_3B:
|
||||||
config.input[port*4].padtype = DEVICE_PAD3B;
|
{
|
||||||
|
if (port && (input.system[0] >= RETRO_DEVICE_MDPAD_3B_WAYPLAY) && (input.system[0] <= RETRO_DEVICE_MSPAD_2B_MASTERTAP))
|
||||||
|
config.input[4].padtype = DEVICE_PAD3B;
|
||||||
|
else
|
||||||
|
config.input[port].padtype = DEVICE_PAD3B;
|
||||||
input.system[port] = SYSTEM_GAMEPAD;
|
input.system[port] = SYSTEM_GAMEPAD;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case RETRO_DEVICE_MDPAD_6B:
|
case RETRO_DEVICE_MDPAD_6B:
|
||||||
config.input[port*4].padtype = DEVICE_PAD6B;
|
{
|
||||||
|
if (port && (input.system[0] >= RETRO_DEVICE_MDPAD_3B_WAYPLAY) && (input.system[0] <= RETRO_DEVICE_MSPAD_2B_MASTERTAP))
|
||||||
|
config.input[4].padtype = DEVICE_PAD6B;
|
||||||
|
else
|
||||||
|
config.input[port].padtype = DEVICE_PAD6B;
|
||||||
input.system[port] = SYSTEM_GAMEPAD;
|
input.system[port] = SYSTEM_GAMEPAD;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case RETRO_DEVICE_MSPAD_2B:
|
case RETRO_DEVICE_MSPAD_2B:
|
||||||
config.input[port*4].padtype = DEVICE_PAD2B;
|
{
|
||||||
|
if (port && (input.system[0] >= RETRO_DEVICE_MDPAD_3B_WAYPLAY) && (input.system[0] <= RETRO_DEVICE_MSPAD_2B_MASTERTAP))
|
||||||
|
config.input[4].padtype = DEVICE_PAD2B;
|
||||||
|
else
|
||||||
|
config.input[port].padtype = DEVICE_PAD2B;
|
||||||
input.system[port] = SYSTEM_GAMEPAD;
|
input.system[port] = SYSTEM_GAMEPAD;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case RETRO_DEVICE_MDPAD_3B_WAYPLAY:
|
case RETRO_DEVICE_MDPAD_3B_WAYPLAY:
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -1780,10 +1798,15 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
|
|||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_JOYPAD:
|
case RETRO_DEVICE_JOYPAD:
|
||||||
default:
|
default:
|
||||||
config.input[port*4].padtype = DEVICE_PAD2B | DEVICE_PAD6B | DEVICE_PAD3B;
|
{
|
||||||
|
if (port && (input.system[0] >= RETRO_DEVICE_MDPAD_3B_WAYPLAY) && (input.system[0] <= RETRO_DEVICE_MSPAD_2B_MASTERTAP))
|
||||||
|
config.input[4].padtype = DEVICE_PAD2B | DEVICE_PAD6B | DEVICE_PAD3B;
|
||||||
|
else
|
||||||
|
config.input[port].padtype = DEVICE_PAD2B | DEVICE_PAD6B | DEVICE_PAD3B;
|
||||||
input.system[port] = SYSTEM_GAMEPAD;
|
input.system[port] = SYSTEM_GAMEPAD;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
old_system[0] = input.system[0];
|
old_system[0] = input.system[0];
|
||||||
old_system[1] = input.system[1];
|
old_system[1] = input.system[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user