diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 257dd53b44..918ca002ac 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1318,7 +1318,7 @@ static bool gl_frame(void *data, const void *frame, * and pause to prevent flicker. */ if ( video_info->black_frame_insertion - && !input_driver_is_nonblock_state() + && !video_info->input_driver_nonblock_state && !video_info->runloop_is_slowmotion && !video_info->runloop_is_paused) { diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 9dd26eda12..bbbe535a1e 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1961,7 +1961,7 @@ static bool vulkan_frame(void *data, const void *frame, * and pause to prevent flicker. */ if ( video_info->black_frame_insertion - && !input_driver_is_nonblock_state() + && !video_info->input_driver_nonblock_state && !video_info->runloop_is_slowmotion && !video_info->runloop_is_paused) { diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 2529a627c5..2b8784b395 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -53,6 +53,7 @@ #include "../driver.h" #include "../retroarch.h" #include "../runloop.h" +#include "../input/input_driver.h" #include "../list_special.h" #include "../core.h" #include "../command.h" @@ -2338,6 +2339,8 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->runloop_is_paused = is_paused; video_info->runloop_is_idle = is_idle; video_info->runloop_is_slowmotion = is_slowmotion; + + video_info->input_driver_nonblock_state = input_driver_is_nonblock_state(); #ifdef HAVE_THREADS video_driver_threaded_unlock(is_threaded); #endif diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 869aae8e47..86931811ab 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -114,60 +114,57 @@ typedef struct video_info typedef struct video_frame_info { - float menu_wallpaper_opacity; - float refresh_rate; + bool input_driver_nonblock_state; bool shared_context; bool black_frame_insertion; bool hard_sync; - unsigned hard_sync_frames; bool fps_show; bool scale_integer; - unsigned aspect_ratio_idx; bool post_filter_record; - unsigned max_swapchain_images; bool windowed_fullscreen; bool fullscreen; - unsigned monitor_index; bool font_enable; - char fps_text[128]; - - unsigned width; - unsigned height; - - float font_msg_pos_x; - float font_msg_pos_y; - float font_msg_color_r; - float font_msg_color_g; - float font_msg_color_b; bool use_rgba; bool libretro_running; - - float menu_header_opacity; - float menu_footer_opacity; - bool xmb_shadows_enable; - float xmb_alpha_factor; - unsigned xmb_theme; - unsigned xmb_color_theme; - unsigned menu_shader_pipeline; - - unsigned materialui_color_theme; - bool battery_level_enable; bool timedate_enable; bool runloop_is_slowmotion; bool runloop_is_idle; bool runloop_is_paused; bool is_perfcnt_enable; - bool menu_is_alive; int custom_vp_x; int custom_vp_y; + + unsigned hard_sync_frames; + unsigned aspect_ratio_idx; + unsigned max_swapchain_images; + unsigned monitor_index; + unsigned width; + unsigned height; + unsigned xmb_theme; + unsigned xmb_color_theme; + unsigned menu_shader_pipeline; + unsigned materialui_color_theme; unsigned custom_vp_width; unsigned custom_vp_height; unsigned custom_vp_full_width; unsigned custom_vp_full_height; + + float menu_wallpaper_opacity; + float refresh_rate; + float font_msg_pos_x; + float font_msg_pos_y; + float font_msg_color_r; + float font_msg_color_g; + float font_msg_color_b; + float menu_header_opacity; + float menu_footer_opacity; + float xmb_alpha_factor; + + char fps_text[128]; } video_frame_info_t; /* Optionally implemented interface to poke more diff --git a/input/input_driver.c b/input/input_driver.c index a7dbaf9c7f..ec0e95619d 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -1015,10 +1015,11 @@ void input_driver_poll(void) bool input_driver_init(void) { - settings_t *settings = config_get_ptr(); - if (current_input) + { + settings_t *settings = config_get_ptr(); current_input_data = current_input->init(settings->arrays.input_joypad_driver); + } if (!current_input_data) return false;