From 2c028964c90fce5917f63e588af9cd2b05303616 Mon Sep 17 00:00:00 2001 From: LazyBumHorse Date: Wed, 28 Aug 2019 09:16:11 +0200 Subject: [PATCH] fix video_driver_get_ident for thread wrapper --- menu/menu_driver.c | 7 +------ retroarch.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index ce264ec5f7..81696e04dc 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1567,12 +1567,7 @@ static bool menu_display_check_compatibility( enum menu_display_driver_type type, bool video_is_threaded) { - const char *video_driver = -#ifdef HAVE_THREADS - (video_is_threaded) ? - video_thread_get_ident() : -#endif - video_driver_get_ident(); + const char *video_driver = video_driver_get_ident(); switch (type) { diff --git a/retroarch.c b/retroarch.c index fc79faf75b..cc551e2827 100644 --- a/retroarch.c +++ b/retroarch.c @@ -17309,7 +17309,15 @@ void video_driver_set_threaded(bool val) const char *video_driver_get_ident(void) { - return (current_video) ? current_video->ident : NULL; + if (!current_video) + return NULL; + +#ifdef HAVE_THREADS + if (video_driver_is_threaded_internal()) + return video_thread_get_ident(); +#endif + + return current_video->ident; } static void video_context_driver_reset(void) @@ -25461,12 +25469,7 @@ static bool rarch_write_debug_info(void) ? settings->arrays.menu_driver : "n/a"); #endif - driver = -#ifdef HAVE_THREADS - (video_driver_is_threaded_internal()) ? - video_thread_get_ident() : -#endif - video_driver_get_ident(); + driver = video_driver_get_ident(); if (string_is_equal(driver, settings->arrays.video_driver)) filestream_printf(file, " - Video: %s\n",