Further optimizations to input_state_device - when input_remote is
false, res is still set to 0, so change conditionals
This commit is contained in:
parent
a723e563f0
commit
7982613d31
19
retroarch.c
19
retroarch.c
|
@ -22758,29 +22758,21 @@ static int16_t input_state_device(
|
|||
#endif
|
||||
{
|
||||
if (input_remap_binds_enable)
|
||||
{
|
||||
if (id < RARCH_FIRST_META_KEY)
|
||||
{
|
||||
bool bind_valid = p_rarch->libretro_input_binds[port]
|
||||
&& p_rarch->libretro_input_binds[port][id].valid;
|
||||
|
||||
if (bind_valid)
|
||||
if (id < RARCH_FIRST_META_KEY && bind_valid)
|
||||
{
|
||||
if (idx < 2 && id < 2)
|
||||
{
|
||||
unsigned offset = RARCH_FIRST_CUSTOM_BIND +
|
||||
(idx * 4) + (id * 2);
|
||||
|
||||
/* First two conditionals -
|
||||
* Reset input state of a button when
|
||||
* the gamepad mapper is in action for that button */
|
||||
if ( settings->uints.input_remap_ids
|
||||
[port][offset] != offset)
|
||||
res = 0;
|
||||
else if (settings->uints.input_remap_ids
|
||||
[port][offset+1] != (offset+1))
|
||||
res = 0;
|
||||
else
|
||||
[port][offset] == offset
|
||||
|| settings->uints.input_remap_ids
|
||||
[port][offset+1] == (offset+1)
|
||||
)
|
||||
{
|
||||
res = ret;
|
||||
#ifdef HAVE_OVERLAY
|
||||
|
@ -22809,7 +22801,6 @@ static int16_t input_state_device(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (p_rarch->input_driver_mapper)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue