fix video_driver_get_ident for thread wrapper

This commit is contained in:
LazyBumHorse 2019-08-28 09:16:11 +02:00
parent 0a35a84c4d
commit 2c028964c9
2 changed files with 11 additions and 13 deletions

View File

@ -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)
{

View File

@ -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",