diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 71915b09ac..fee642a68c 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -285,7 +285,7 @@ static void caca_set_texture_frame(void *data, caca_menu_frame = NULL; } - if ( !caca_menu_frame || + if ( !caca_menu_frame || caca_menu_width != width || caca_menu_height != height || caca_menu_pitch != pitch) @@ -320,11 +320,7 @@ static const video_poke_interface_t caca_poke_interface = { NULL, caca_set_texture_frame, NULL, -#if defined(HAVE_MENU) caca_set_osd_msg, -#else - NULL, -#endif NULL, NULL, diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 5a9a2db414..41ff5346af 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -1135,9 +1135,7 @@ static const video_poke_interface_t ctr_poke_interface = { ctr_apply_state_changes, ctr_set_texture_frame, ctr_set_texture_enable, -#ifdef HAVE_MENU ctr_set_osd_msg, -#endif NULL, NULL, NULL diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 05b008af02..e5bd086025 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -548,11 +548,7 @@ static const video_poke_interface_t gdi_poke_interface = { NULL, gdi_set_texture_frame, NULL, -#if defined(HAVE_MENU) gdi_set_osd_msg, -#else - NULL, -#endif NULL, NULL, diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index fd423067f9..f37d39dc8a 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -845,7 +845,6 @@ static void gl_render_osd_background( video_info->height, false, true); } -#if defined(HAVE_MENU) static void gl_set_osd_msg(void *data, video_frame_info_t *video_info, const char *msg, @@ -854,6 +853,7 @@ static void gl_set_osd_msg(void *data, font_driver_render_msg(video_info, font, msg, params); } +#if defined(HAVE_MENU) static void gl_show_mouse(void *data, bool state) { video_context_driver_show_mouse(&state); @@ -2555,12 +2555,11 @@ static const video_poke_interface_t gl_poke_interface = { gl_apply_state_changes, gl_set_texture_frame, gl_set_texture_enable, -#if defined(HAVE_MENU) gl_set_osd_msg, +#if defined(HAVE_MENU) gl_show_mouse, #else NULL, - NULL, #endif NULL, diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index d3c0da58d2..90b767661c 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -696,8 +696,6 @@ static void sdl2_poke_texture_enable(void *data, vid->menu.active = enable; } - -#ifdef HAVE_MENU static void sdl2_poke_set_osd_msg(void *data, video_frame_info_t *video_info, const char *msg, @@ -708,6 +706,7 @@ static void sdl2_poke_set_osd_msg(void *data, RARCH_LOG("[SDL2]: OSD MSG: %s\n", msg); } +#ifdef HAVE_MENU static void sdl2_show_mouse(void *data, bool state) { (void)data; @@ -737,14 +736,13 @@ static video_poke_interface_t sdl2_video_poke_interface = { sdl2_poke_apply_state_changes, sdl2_poke_set_texture_frame, sdl2_poke_texture_enable, -#ifdef HAVE_MENU sdl2_poke_set_osd_msg, +#ifdef HAVE_MENU sdl2_show_mouse, sdl2_grab_mouse_toggle, #else NULL, NULL, - NULL, #endif NULL, }; diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index 036599f235..a5fe591c91 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -407,11 +407,7 @@ static const video_poke_interface_t vga_poke_interface = { NULL, vga_set_texture_frame, NULL, -#if defined(HAVE_MENU) vga_set_osd_msg, -#else - NULL, -#endif NULL, NULL, diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 88bc963030..9b620eaa7b 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -794,9 +794,7 @@ static const video_poke_interface_t vita_poke_interface = { vita_apply_state_changes, vita_set_texture_frame, vita_set_texture_enable, -#ifdef HAVE_MENU vita_set_osd_msg, -#endif NULL, NULL, NULL, diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index a655442080..a800655c1e 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -190,7 +190,6 @@ static void xshm_poke_set_osd_msg(void *data, const char *msg, const struct font_params *params, void *font) { - } static void xshm_show_mouse(void *data, bool state) @@ -220,14 +219,13 @@ static video_poke_interface_t xshm_video_poke_interface = { xshm_poke_apply_state_changes, xshm_poke_set_texture_frame, xshm_poke_texture_enable, -#ifdef HAVE_MENU xshm_poke_set_osd_msg, +#ifdef HAVE_MENU xshm_show_mouse, xshm_grab_mouse_toggle, #else NULL, NULL, - NULL, #endif NULL, }; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index fe95d4af2c..105d1669e3 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -467,10 +467,6 @@ typedef struct video_frame_info bool (*cb_set_resize)(void*, unsigned, unsigned); void (*cb_shader_use)(void *data, void *shader_data, unsigned index, bool set_active); -#if 0 - bool (*cb_set_coords)(void *handle_data, - void *shader_data, const struct video_coords *coords); -#endif bool (*cb_set_mvp)(void *data, void *shader_data, const void *mat_data); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 23faea64dd..8c567ef2d4 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1192,7 +1192,6 @@ static void thread_set_texture_enable(void *data, bool state, bool full_screen) slock_unlock(thr->frame.lock); } -#if defined(HAVE_MENU) static void thread_set_osd_msg(void *data, video_frame_info_t *video_info, const char *msg, @@ -1208,7 +1207,6 @@ static void thread_set_osd_msg(void *data, if (thr->poke && thr->poke->set_osd_msg) thr->poke->set_osd_msg(thr->driver_data, video_info, msg, params, font); } -#endif static uintptr_t thread_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) @@ -1270,11 +1268,7 @@ static const video_poke_interface_t thread_poke = { thread_apply_state_changes, thread_set_texture_frame, thread_set_texture_enable, -#if defined(HAVE_MENU) thread_set_osd_msg, -#else - NULL, -#endif NULL, NULL, diff --git a/retroarch.c b/retroarch.c index 9a48ec767a..bb56980c44 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2364,7 +2364,9 @@ static enum runloop_state runloop_check_state( unsigned *sleep_ms) { retro_bits_t current_input; +#ifdef HAVE_MENU static retro_bits_t last_input = {{0}}; +#endif static bool old_fs_toggle_pressed= false; static bool old_focus = true; bool is_focused = false; @@ -2383,9 +2385,8 @@ static enum runloop_state runloop_check_state( #endif input_keys_pressed(settings, ¤t_input); - last_input = current_input; - #ifdef HAVE_MENU + last_input = current_input; if ( ((settings->uints.input_menu_toggle_gamepad_combo != INPUT_TOGGLE_NONE) && input_driver_toggle_button_combo(