diff --git a/runloop.c b/runloop.c index 2cf44f578a..6f8db08066 100644 --- a/runloop.c +++ b/runloop.c @@ -72,13 +72,27 @@ #define DEFAULT_EXT "" #endif +#define SHADER_EXT_GLSL 0x7c976537U +#define SHADER_EXT_GLSLP 0x0f840c87U +#define SHADER_EXT_CG 0x0059776fU +#define SHADER_EXT_CGP 0x0b8865bfU + +#define runloop_cmd_triggered(cmd, id) BIT64_GET(cmd->state[2], id) + +#define runloop_cmd_press(cmd, id) BIT64_GET(cmd->state[0], id) +#define runloop_cmd_pressed(cmd, id) BIT64_GET(cmd->state[1], id) +#ifdef HAVE_MENU +#define runloop_cmd_menu_press(cmd) (BIT64_GET(cmd->state[2], RARCH_MENU_TOGGLE) || \ + runloop_cmd_get_state_menu_toggle_button_combo( \ + settings, cmd->state[0], \ + cmd->state[1], cmd->state[2])) +#endif + typedef struct event_cmd_state { retro_input_t state[3]; } event_cmd_state_t; - - static msg_queue_t *g_msg_queue; global_t *global_get_ptr(void) @@ -87,7 +101,6 @@ global_t *global_get_ptr(void) return &g_extern; } - const char *runloop_msg_queue_pull(void) { const char *ret = NULL; @@ -168,17 +181,6 @@ static bool runloop_cmd_get_state_menu_toggle_button_combo( } #endif -#define runloop_cmd_triggered(cmd, id) BIT64_GET(cmd->state[2], id) - -#define runloop_cmd_press(cmd, id) BIT64_GET(cmd->state[0], id) -#define runloop_cmd_pressed(cmd, id) BIT64_GET(cmd->state[1], id) -#ifdef HAVE_MENU -#define runloop_cmd_menu_press(cmd) (BIT64_GET(cmd->state[2], RARCH_MENU_TOGGLE) || \ - runloop_cmd_get_state_menu_toggle_button_combo( \ - settings, cmd->state[0], \ - cmd->state[1], cmd->state[2])) -#endif - /** * check_pause: * @pressed : was libretro pause key pressed? @@ -287,11 +289,6 @@ static void check_stateslots(settings_t *settings, RARCH_LOG("%s\n", msg); } -#define SHADER_EXT_GLSL 0x7c976537U -#define SHADER_EXT_GLSLP 0x0f840c87U -#define SHADER_EXT_CG 0x0059776fU -#define SHADER_EXT_CGP 0x0b8865bfU - static void shader_dir_free(rarch_dir_list_t *dir_list) { if (!dir_list)