Turn video_driver_is_threaded into macro

This commit is contained in:
twinaphex 2017-04-29 17:33:36 +02:00
parent a5d7bedb8a
commit d86f466fe9
2 changed files with 6 additions and 10 deletions

View File

@ -88,6 +88,12 @@
display_lock = NULL; \
context_lock = NULL
#ifdef HAVE_THREADS
#define video_driver_is_threaded() ((!video_driver_is_hw_context() && video_driver_threaded) ? true : false)
#else
#define video_driver_is_threaded() (false)
#endif
#define video_driver_threaded_lock() \
if (video_driver_is_threaded()) \
video_driver_lock()
@ -360,15 +366,6 @@ void video_driver_set_threaded(bool val)
video_driver_threaded = val;
}
bool video_driver_is_threaded(void)
{
#ifdef HAVE_THREADS
if (!video_driver_is_hw_context() && video_driver_threaded)
return true;
#endif
return false;
}
/**
* video_driver_get_ptr:
*

View File

@ -385,7 +385,6 @@ bool video_driver_get_hw_render_interface(const struct
bool video_driver_get_viewport_info(struct video_viewport *viewport);
void video_driver_set_title_buf(void);
void video_driver_monitor_adjust_system_rates(void);
bool video_driver_is_threaded(void);
/**
* video_driver_find_handle: