diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 4faf5a9823..fbf2fb02f3 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1132,3 +1132,14 @@ void *rarch_threaded_video_get_ptr(const video_driver_t **drv) return NULL; return thr->driver_data; } + +const char *rarch_threaded_video_get_ident(void) +{ + driver_t *driver = driver_get_ptr(); + const thread_video_t *thr = (const thread_video_t*) + driver->video_data; + + if (!thr) + return NULL; + return thr->driver->ident; +} diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 4817e4e717..d5bd9de543 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -254,5 +254,7 @@ bool rarch_threaded_video_init( **/ void *rarch_threaded_video_get_ptr(const video_driver_t **drv); +const char *rarch_threaded_video_get_ident(void); + #endif diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 6576fead24..f4d22272c6 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -173,7 +173,7 @@ void init_menu(void) find_menu_driver(); - video_driver = video_driver_get_ident(); + video_driver = menu_video_get_ident(); switch (driver->menu_ctx->type) { diff --git a/menu/menu_video.c b/menu/menu_video.c index 91ed5424ad..93537fc3cb 100644 --- a/menu/menu_video.c +++ b/menu/menu_video.c @@ -21,6 +21,7 @@ #include "menu_video.h" #include "../gfx/video_common.h" +#include "../gfx/video_thread_wrapper.h" #ifdef HAVE_OPENGL void menu_video_draw_frame( @@ -140,3 +141,12 @@ void menu_video_frame_background( gl->coords.color = gl->white_color_ptr; } #endif + +const char *menu_video_get_ident(void) +{ + settings_t *settings = config_get_ptr(); + if (settings->video.threaded) + return rarch_threaded_video_get_ident(); + + return video_driver_get_ident(); +} diff --git a/menu/menu_video.h b/menu/menu_video.h index 270e5f8056..a45967f937 100644 --- a/menu/menu_video.h +++ b/menu/menu_video.h @@ -44,6 +44,8 @@ void menu_video_frame_background( bool force_transparency); #endif +const char *menu_video_get_ident(void); + #ifdef __cplusplus } #endif