From 96a485f88546b91aafc56fc7ba10fd3b5f3686a9 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Sun, 29 May 2022 21:58:39 +0200 Subject: [PATCH] Move struct and macros for input to input_types.h --- configuration.h | 24 ------------------------ input/input_types.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/configuration.h b/configuration.h index d9687cf0f5..b9cb660303 100644 --- a/configuration.h +++ b/configuration.h @@ -30,7 +30,6 @@ #endif #include "gfx/video_defines.h" -#include "input/input_defines.h" #include "led/led_defines.h" #ifdef HAVE_LAKKA @@ -69,8 +68,6 @@ strlcpy(var, newvar, sizeof(var)); \ } -#define INPUT_CONFIG_BIND_MAP_GET(i) ((const struct input_bind_map*)&input_config_bind_map[(i)]) - enum crt_switch_type { CRT_SWITCH_NONE = 0, @@ -90,25 +87,6 @@ enum override_type RETRO_BEGIN_DECLS -/* Input config. */ -struct input_bind_map -{ - const char *base; - - enum msg_hash_enums desc; - - /* Meta binds get input as prefix, not input_playerN". - * 0 = libretro related. - * 1 = Common hotkey. - * 2 = Uncommon/obscure hotkey. - */ - uint8_t meta; - - uint8_t retro_key; - - bool valid; -}; - typedef struct settings { struct @@ -1161,8 +1139,6 @@ void input_config_parse_mouse_button( const char *input_config_get_prefix(unsigned user, bool meta); -extern const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL]; - RETRO_END_DECLS #endif diff --git a/input/input_types.h b/input/input_types.h index 77514d195b..e55775c3e8 100644 --- a/input/input_types.h +++ b/input/input_types.h @@ -35,6 +35,22 @@ enum input_game_focus_cmd_type GAME_FOCUS_CMD_REAPPLY }; +/* Input config. */ +struct input_bind_map +{ + const char *base; + enum msg_hash_enums desc; + /* Meta binds get input as prefix, not input_playerN". + * 0 = libretro related. + * 1 = Common hotkey. + * 2 = Uncommon/obscure hotkey. + */ + uint8_t meta; + uint8_t retro_key; + bool valid; +}; + + /* Turbo support. */ struct turbo_buttons { @@ -103,6 +119,10 @@ typedef struct input_game_focus_state bool core_requested; } input_game_focus_state_t; +#define INPUT_CONFIG_BIND_MAP_GET(i) ((const struct input_bind_map*)&input_config_bind_map[(i)]) + +extern const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL]; + typedef struct rarch_joypad_driver input_device_driver_t; typedef struct input_keyboard_line input_keyboard_line_t; typedef struct rarch_joypad_info rarch_joypad_info_t;