parent
5c6cd1b48a
commit
d11c7cbbb1
21
retroarch.c
21
retroarch.c
|
@ -22302,14 +22302,10 @@ static int16_t input_state_device(
|
|||
unsigned idx, unsigned id,
|
||||
bool button_mask)
|
||||
{
|
||||
unsigned i;
|
||||
int16_t res = 0;
|
||||
settings_t *settings = p_rarch->configuration_settings;
|
||||
input_mapper_t *handle = &p_rarch->input_driver_mapper;
|
||||
unsigned iterations = button_mask ? RARCH_FIRST_CUSTOM_BIND : 1;
|
||||
|
||||
for (i = 0; i < iterations; i++, id++)
|
||||
{
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
|
@ -22591,8 +22587,6 @@ static int16_t input_state_device(
|
|||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -22706,11 +22700,16 @@ static int16_t input_state(unsigned port, unsigned device,
|
|||
if ( (p_rarch->input_driver_flushing_input == 0)
|
||||
&& !p_rarch->input_driver_block_libretro_input)
|
||||
{
|
||||
bool button_mask = (device == RETRO_DEVICE_JOYPAD) &&
|
||||
(id == RETRO_DEVICE_ID_JOYPAD_MASK);
|
||||
|
||||
result = input_state_device(p_rarch, ret, port, device, idx,
|
||||
button_mask ? 0 : id, button_mask);
|
||||
if ( (device == RETRO_DEVICE_JOYPAD) &&
|
||||
(id == RETRO_DEVICE_ID_JOYPAD_MASK))
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
|
||||
if (input_state_device(p_rarch, ret, port, device, idx, i, true))
|
||||
result |= (1 << i);
|
||||
}
|
||||
else
|
||||
result = input_state_device(p_rarch, ret, port, device, idx, id, false);
|
||||
}
|
||||
|
||||
#ifdef HAVE_BSV_MOVIE
|
||||
|
|
Loading…
Reference in New Issue