Merge pull request #149 from retro-wertz/updates

Fix crashing when trying to connect a netplay session
This commit is contained in:
hizzlekizzle
2017-09-10 12:26:39 -05:00
committed by GitHub

View File

@@ -533,6 +533,8 @@ void retro_set_input_state(retro_input_state_t cb)
void retro_set_controller_port_device(unsigned port, unsigned device) void retro_set_controller_port_device(unsigned port, unsigned device)
{ {
if (port < 2) /* port #0 = player1/player3, port #1 = player2/player4 */
{
switch(device) switch(device)
{ {
case RETRO_DEVICE_JOYPAD: case RETRO_DEVICE_JOYPAD:
@@ -542,9 +544,9 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
FCEUI_SetInput(port, SI_ZAPPER, &MouseData[0], 1); FCEUI_SetInput(port, SI_ZAPPER, &MouseData[0], 1);
break; break;
} }
}
} }
void retro_set_environment(retro_environment_t cb) void retro_set_environment(retro_environment_t cb)
{ {
static const struct retro_variable vars[] = { static const struct retro_variable vars[] = {