Revert "Remove some unnecesary functions"

This reverts commit 1f13f26ba4404b14fae94f9aac4be03bb9b58158.
This commit is contained in:
twinaphex 2015-12-08 12:55:43 +01:00
parent 91dcce5d58
commit 34dbd35642
3 changed files with 24 additions and 1 deletions

View File

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

View File

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

View File

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