Add video_driver_is_threaded

This commit is contained in:
twinaphex 2018-07-14 05:23:03 +02:00
parent 0d39701145
commit cc473a25b9
2 changed files with 9 additions and 2 deletions

View File

@ -74,9 +74,9 @@
#define FPS_UPDATE_INTERVAL 256
#ifdef HAVE_THREADS
#define video_driver_is_threaded() ((!video_driver_is_hw_context() && video_driver_threaded) ? true : false)
#define video_driver_is_threaded_internal() ((!video_driver_is_hw_context() && video_driver_threaded) ? true : false)
#else
#define video_driver_is_threaded() (false)
#define video_driver_is_threaded_internal() (false)
#endif
#ifdef HAVE_THREADS
@ -505,6 +505,11 @@ const char* config_get_video_driver_options(void)
return char_list_new_special(STRING_LIST_VIDEO_DRIVERS, NULL);
}
bool video_driver_is_threaded(void)
{
return video_driver_is_threaded_internal();
}
#ifdef HAVE_VULKAN
static bool hw_render_context_is_vulkan(enum retro_hw_context_type type)
{

View File

@ -1246,6 +1246,8 @@ extern bool (*video_driver_cb_has_focus)(void);
bool video_driver_started_fullscreen(void);
bool video_driver_is_threaded(void);
extern video_driver_t video_gl;
extern video_driver_t video_vulkan;
extern video_driver_t video_metal;