mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
Revert "Move set_keybinds autoconfiguration (that is done on every console"
This reverts commit c26653fca83af90fc14bd2fca0324bfaf1a1156f.
This commit is contained in:
parent
d67e4da4db
commit
f028a8555e
32
driver.c
32
driver.c
@ -895,44 +895,12 @@ void init_video_input(void)
|
|||||||
RARCH_ERR("Cannot init input driver. Exiting ...\n");
|
RARCH_ERR("Cannot init input driver. Exiting ...\n");
|
||||||
rarch_fail(1, "init_video_input()");
|
rarch_fail(1, "init_video_input()");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RARCH_ERR("Cannot find input driver. Exiting ...\n");
|
RARCH_ERR("Cannot find input driver. Exiting ...\n");
|
||||||
rarch_fail(1, "init_video_input()");
|
rarch_fail(1, "init_video_input()");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (driver.input != NULL)
|
|
||||||
{
|
|
||||||
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
|
||||||
{
|
|
||||||
unsigned action = 0;
|
|
||||||
|
|
||||||
if (driver.input->set_keybinds)
|
|
||||||
action |= (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS);
|
|
||||||
|
|
||||||
switch (g_settings.input.dpad_emulation[i])
|
|
||||||
{
|
|
||||||
case ANALOG_DPAD_LSTICK:
|
|
||||||
action |= (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
|
||||||
break;
|
|
||||||
case ANALOG_DPAD_RSTICK:
|
|
||||||
action |= (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_RSTICK);
|
|
||||||
break;
|
|
||||||
case ANALOG_DPAD_NONE:
|
|
||||||
action |= (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (action)
|
|
||||||
if (driver.input->set_keybinds)
|
|
||||||
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
|
||||||
action);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
|
@ -446,6 +446,37 @@ static void *gx_input_init(void)
|
|||||||
SYS_SetPowerCallback(power_callback);
|
SYS_SetPowerCallback(power_callback);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
(1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
{
|
||||||
|
unsigned keybind_action = 0;
|
||||||
|
|
||||||
|
switch (g_settings.input.dpad_emulation[i])
|
||||||
|
{
|
||||||
|
case ANALOG_DPAD_LSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_RSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_RSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_NONE:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keybind_action)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
keybind_action);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,6 +513,36 @@ static void* ps3_input_init(void)
|
|||||||
cellMouseInit(MAX_MICE);
|
cellMouseInit(MAX_MICE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
(1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
{
|
||||||
|
unsigned keybind_action = 0;
|
||||||
|
|
||||||
|
switch (g_settings.input.dpad_emulation[i])
|
||||||
|
{
|
||||||
|
case ANALOG_DPAD_LSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_RSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_RSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_NONE:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keybind_action)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
keybind_action);
|
||||||
|
}
|
||||||
|
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +167,36 @@ static void* psp_input_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
sceCtrlSetSamplingMode(DEFAULT_SAMPLING_MODE);
|
sceCtrlSetSamplingMode(DEFAULT_SAMPLING_MODE);
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
(1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
{
|
||||||
|
unsigned keybind_action = 0;
|
||||||
|
|
||||||
|
switch (g_settings.input.dpad_emulation[i])
|
||||||
|
{
|
||||||
|
case ANALOG_DPAD_LSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_RSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_RSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_NONE:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keybind_action)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
action);
|
||||||
|
}
|
||||||
|
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,6 +399,36 @@ static void *xdk_input_init(void)
|
|||||||
while(XGetDeviceEnumerationStatus() == XDEVICE_ENUMERATION_BUSY) {}
|
while(XGetDeviceEnumerationStatus() == XDEVICE_ENUMERATION_BUSY) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
(1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
|
||||||
|
|
||||||
|
for(unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||||
|
{
|
||||||
|
unsigned keybind_action = 0;
|
||||||
|
|
||||||
|
switch (g_settings.input.dpad_emulation[i])
|
||||||
|
{
|
||||||
|
case ANALOG_DPAD_LSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_RSTICK:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_RSTICK);
|
||||||
|
break;
|
||||||
|
case ANALOG_DPAD_NONE:
|
||||||
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keybind_action)
|
||||||
|
if (driver.input->set_keybinds)
|
||||||
|
driver.input->set_keybinds(driver.input_data, 0, i, 0,
|
||||||
|
keybind_action);
|
||||||
|
}
|
||||||
|
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user