mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-18 23:04:25 +00:00
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 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);
|
||||
|
||||
const char *rarch_threaded_video_get_ident(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -173,7 +173,7 @@ void init_menu(void)
|
||||
|
||||
find_menu_driver();
|
||||
|
||||
video_driver = video_driver_get_ident();
|
||||
video_driver = menu_video_get_ident();
|
||||
|
||||
switch (driver->menu_ctx->type)
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "menu_video.h"
|
||||
|
||||
#include "../gfx/video_common.h"
|
||||
#include "../gfx/video_thread_wrapper.h"
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
void menu_video_draw_frame(
|
||||
@ -140,3 +141,12 @@ void menu_video_frame_background(
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
}
|
||||
#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);
|
||||
#endif
|
||||
|
||||
const char *menu_video_get_ident(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user