Fix RGUI fallback - if threaded video wrapper was enabled,
we could not grab an ident resembling 'd3d' or 'gl'
This commit is contained in:
parent
49d048fde2
commit
0bf8a36d50
|
@ -1132,3 +1132,14 @@ void *rarch_threaded_video_get_ptr(const video_driver_t **drv)
|
||||||
return NULL;
|
return NULL;
|
||||||
return thr->driver_data;
|
return thr->driver_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *rarch_threaded_video_get_ident(void)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
const thread_video_t *thr = (const thread_video_t*)
|
||||||
|
driver->video_data;
|
||||||
|
|
||||||
|
if (!thr)
|
||||||
|
return NULL;
|
||||||
|
return thr->driver->ident;
|
||||||
|
}
|
||||||
|
|
|
@ -254,5 +254,7 @@ bool rarch_threaded_video_init(
|
||||||
**/
|
**/
|
||||||
void *rarch_threaded_video_get_ptr(const video_driver_t **drv);
|
void *rarch_threaded_video_get_ptr(const video_driver_t **drv);
|
||||||
|
|
||||||
|
const char *rarch_threaded_video_get_ident(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ void init_menu(void)
|
||||||
|
|
||||||
find_menu_driver();
|
find_menu_driver();
|
||||||
|
|
||||||
video_driver = video_driver_get_ident();
|
video_driver = menu_video_get_ident();
|
||||||
|
|
||||||
switch (driver->menu_ctx->type)
|
switch (driver->menu_ctx->type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "menu_video.h"
|
#include "menu_video.h"
|
||||||
|
|
||||||
#include "../gfx/video_common.h"
|
#include "../gfx/video_common.h"
|
||||||
|
#include "../gfx/video_thread_wrapper.h"
|
||||||
|
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
void menu_video_draw_frame(
|
void menu_video_draw_frame(
|
||||||
|
@ -140,3 +141,12 @@ void menu_video_frame_background(
|
||||||
gl->coords.color = gl->white_color_ptr;
|
gl->coords.color = gl->white_color_ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *menu_video_get_ident(void)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
if (settings->video.threaded)
|
||||||
|
return rarch_threaded_video_get_ident();
|
||||||
|
|
||||||
|
return video_driver_get_ident();
|
||||||
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ void menu_video_frame_background(
|
||||||
bool force_transparency);
|
bool force_transparency);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *menu_video_get_ident(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue