Don't include config_file.h inside input_config.h

This commit is contained in:
twinaphex 2016-12-15 11:17:48 +01:00
parent 2da5db592e
commit 45e841c5c5
2 changed files with 11 additions and 9 deletions

View File

@ -21,6 +21,7 @@
#include <compat/strl.h>
#include <file/file_path.h>
#include <file/config_file.h>
#include <string/stdstring.h>
#ifdef HAVE_CONFIG_H
@ -181,12 +182,13 @@ const char *input_config_bind_map_get_desc(unsigned i)
return msg_hash_to_str(keybind->desc);
}
void input_config_parse_key(config_file_t *conf,
void input_config_parse_key(void *data,
const char *prefix, const char *btn,
struct retro_keybind *bind)
{
char tmp[64];
char key[64];
config_file_t *conf = (config_file_t*)data;
tmp[0] = key[0] = '\0';
@ -290,7 +292,7 @@ static void parse_hat(struct retro_keybind *bind, const char *str)
bind->joykey = HAT_MAP(hat, hat_dir);
}
void input_config_parse_joy_button(config_file_t *conf, const char *prefix,
void input_config_parse_joy_button(void *data, const char *prefix,
const char *btn, struct retro_keybind *bind)
{
char str[256];
@ -298,6 +300,7 @@ void input_config_parse_joy_button(config_file_t *conf, const char *prefix,
char key[64];
char key_label[64] = {0};
char *tmp_a = NULL;
config_file_t *conf = (config_file_t*)data;
str[0] = tmp[0] = key[0] = '\0';
@ -329,14 +332,15 @@ void input_config_parse_joy_button(config_file_t *conf, const char *prefix,
}
}
void input_config_parse_joy_axis(config_file_t *conf, const char *prefix,
void input_config_parse_joy_axis(void *data, const char *prefix,
const char *axis, struct retro_keybind *bind)
{
char str[256];
char tmp[64];
char key[64];
char key_label[64];
char *tmp_a = NULL;
char *tmp_a = NULL;
config_file_t *conf = (config_file_t*)data;
str[0] = tmp[0] = key[0] = key_label[0] = '\0';

View File

@ -19,8 +19,6 @@
#include <stdint.h>
#include <file/config_file.h>
#include "input_driver.h"
const char *input_config_bind_map_get_base(unsigned i);
@ -59,14 +57,14 @@ const char *input_config_get_prefix(unsigned user, bool meta);
**/
unsigned input_config_translate_str_to_bind_id(const char *str);
void input_config_parse_key(config_file_t *conf,
void input_config_parse_key(void *data,
const char *prefix, const char *btn,
struct retro_keybind *bind);
void input_config_parse_joy_button(config_file_t *conf, const char *prefix,
void input_config_parse_joy_button(void *data, const char *prefix,
const char *btn, struct retro_keybind *bind);
void input_config_parse_joy_axis(config_file_t *conf, const char *prefix,
void input_config_parse_joy_axis(void *data, const char *prefix,
const char *axis, struct retro_keybind *bind);
const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned id);