diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index cd2167766f..e801052c43 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1296,6 +1296,15 @@ void *rarch_threaded_video_get_ptr(const video_driver_t **drv) return thr->driver_data; } +const char *rarch_threaded_video_get_ident(void) +{ + const thread_video_t *thr = (const thread_video_t*)video_driver_get_ptr(true); + + if (!thr || !thr->driver) + return NULL; + return thr->driver->ident; +} + static void rarch_threaded_video_send_and_wait(thread_video_t *thr, thread_packet_t *pkt) { if (!thr || !pkt) diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index d9e3531bf3..529fc81caf 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -106,6 +106,8 @@ bool rarch_threaded_video_init( **/ void *rarch_threaded_video_get_ptr(const video_driver_t **drv); +const char *rarch_threaded_video_get_ident(void); + bool rarch_threaded_video_font_init(const void **font_driver, void **font_handle, void *data, const char *font_path, float font_size, diff --git a/menu/menu_display.c b/menu/menu_display.c index a2b3961adc..fabc7d2936 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -176,9 +176,21 @@ void menu_display_free_main_font(void) } } +static const char *menu_video_get_ident(void) +{ +#ifdef HAVE_THREADS + settings_t *settings = config_get_ptr(); + + if (settings->video.threaded) + return rarch_threaded_video_get_ident(); +#endif + + return video_driver_get_ident(); +} + static bool menu_display_check_compatibility(enum menu_display_driver_type type) { - const char *video_driver = video_driver_get_ident(); + const char *video_driver = menu_video_get_ident(); switch (type) {