Don't expose struct in header anymore

This commit is contained in:
twinaphex 2015-11-28 00:59:47 +01:00
parent 0b0b3431b0
commit 7ca0d74005
4 changed files with 21 additions and 23 deletions

View File

@ -60,9 +60,9 @@ static void input_autoconfigure_joypad_conf(config_file_t *conf,
for (i = 0; i < RARCH_BIND_LIST_END; i++)
{
input_config_parse_joy_button(conf, "input",
input_config_bind_map[i].base, &binds[i]);
input_bind_map_get_base(i), &binds[i]);
input_config_parse_joy_axis(conf, "input",
input_config_bind_map[i].base, &binds[i]);
input_bind_map_get_base(i), &binds[i]);
}
}

View File

@ -30,6 +30,23 @@
#include "../config.h"
#endif
/* Input config. */
struct input_bind_map
{
bool valid;
/* Meta binds get input as prefix, not input_playerN".
* 0 = libretro related.
* 1 = Common hotkey.
* 2 = Uncommon/obscure hotkey.
*/
unsigned meta;
const char *base;
const char *desc;
unsigned retro_key;
};
static const char *bind_user_prefix[MAX_USERS] = {
"input_player1",
"input_player2",

View File

@ -21,25 +21,6 @@
#include <stdint.h>
#include "../driver.h"
/* Input config. */
struct input_bind_map
{
bool valid;
/* Meta binds get input as prefix, not input_playerN".
* 0 = libretro related.
* 1 = Common hotkey.
* 2 = Uncommon/obscure hotkey.
*/
unsigned meta;
const char *base;
const char *desc;
unsigned retro_key;
};
extern const struct input_bind_map input_config_bind_map[];
const void *input_bind_map_get(unsigned i);
const char *input_bind_map_get_base(unsigned i);

View File

@ -735,8 +735,8 @@ int menu_input_key_bind_iterate(char *s, size_t len)
snprintf(s, len,
"[%s]\npress keyboard or joypad\n(timeout %d %s)",
input_config_bind_map[
menu_input->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc,
input_bind_map_get_desc(
menu_input->binds.begin - MENU_SETTINGS_BIND_BEGIN),
timeout,
menu_hash_to_str(MENU_VALUE_SECONDS));