Create input_remapping_state

This commit is contained in:
twinaphex 2015-04-10 02:46:10 +02:00
parent a08a8b8800
commit a0d0345f36
3 changed files with 14 additions and 4 deletions

View File

@ -127,3 +127,12 @@ void input_remapping_set_defaults(void)
settings->input.remap_ids[i][j] = settings->input.binds[i][j].id;
}
}
void input_remapping_state(unsigned port,
unsigned device, unsigned *idx, unsigned *id)
{
settings_t *settings = config_get_ptr();
if (*id < RARCH_FIRST_META_KEY)
*id = settings->input.remap_ids[port][*id];
}

View File

@ -46,6 +46,9 @@ bool input_remapping_save_file(const char *path);
void input_remapping_set_defaults(void);
void input_remapping_state(unsigned port,
unsigned device, unsigned *idx, unsigned *id);
#ifdef __cplusplus
}
#endif

View File

@ -432,10 +432,8 @@ static int16_t input_state(unsigned port, unsigned device,
}
if (settings->input.remap_binds_enable)
{
if (id < RARCH_FIRST_META_KEY)
id = settings->input.remap_ids[port][id];
}
input_remapping_state(port, device, &idx, &id);
if (!driver->block_libretro_input)
{