mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Cleanup old ugly hack
This commit is contained in:
parent
70a79a73ca
commit
dc73edadcf
@ -808,6 +808,7 @@ menu_ctx_driver_t menu_ctx_glui = {
|
||||
NULL,
|
||||
glui_load_image,
|
||||
"glui",
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
glui_environ,
|
||||
NULL,
|
||||
};
|
||||
|
@ -52,6 +52,7 @@ menu_ctx_driver_t menu_ctx_null = {
|
||||
NULL, /* bind_init */
|
||||
NULL, /* load_image */
|
||||
"null",
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
@ -777,6 +777,7 @@ menu_ctx_driver_t menu_ctx_rgui = {
|
||||
NULL,
|
||||
NULL,
|
||||
"rgui",
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
rgui_environ,
|
||||
NULL,
|
||||
};
|
||||
|
@ -353,6 +353,7 @@ menu_ctx_driver_t menu_ctx_rmenu = {
|
||||
NULL,
|
||||
NULL,
|
||||
"rmenu",
|
||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||
rmenu_environ,
|
||||
NULL,
|
||||
};
|
||||
|
@ -712,6 +712,7 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = {
|
||||
rmenu_xui_list_set_selection,
|
||||
NULL,
|
||||
"rmenu_xui",
|
||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||
rmenu_xui_environ,
|
||||
NULL,
|
||||
};
|
||||
|
@ -2591,6 +2591,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
|
||||
xmb_list_bind_init,
|
||||
xmb_load_image,
|
||||
"xmb",
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
xmb_environ,
|
||||
NULL,
|
||||
};
|
||||
|
@ -154,31 +154,39 @@ void find_menu_driver(void)
|
||||
|
||||
void init_menu(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
int i;
|
||||
const char *video_driver;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (driver->menu)
|
||||
return;
|
||||
|
||||
(void)settings;
|
||||
(void)i;
|
||||
|
||||
find_menu_driver();
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
/* TOD/FIXME - UGLY HACK!!!!
|
||||
* Will have to be fixed properly after release. */
|
||||
if (!strcmp(driver->menu_ctx->ident, "xmb") ||
|
||||
!strcmp(driver->menu_ctx->ident, "glui"))
|
||||
{
|
||||
const char *video_driver = video_driver_get_ident();
|
||||
video_driver = video_driver_get_ident();
|
||||
|
||||
if (video_driver && !strcmp(video_driver, "d3d"))
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int i = find_menu_driver_internal("rgui");
|
||||
if (i >= 0)
|
||||
switch (driver->menu_ctx->type)
|
||||
{
|
||||
case MENU_VIDEO_DRIVER_GENERIC:
|
||||
case MENU_VIDEO_DRIVER_DIRECT3D:
|
||||
break;
|
||||
case MENU_VIDEO_DRIVER_OPENGL:
|
||||
if (video_driver && !strcmp(video_driver, "d3d"))
|
||||
{
|
||||
driver->menu_ctx = (const menu_ctx_driver_t*)menu_driver_find_handle(i);
|
||||
if (settings)
|
||||
strlcpy(settings->menu.driver, "rgui", sizeof(settings->menu.driver));
|
||||
int i = find_menu_driver_internal("rgui");
|
||||
if (i >= 0)
|
||||
{
|
||||
driver->menu_ctx = (const menu_ctx_driver_t*)menu_driver_find_handle(i);
|
||||
if (settings)
|
||||
strlcpy(settings->menu.driver, "rgui", sizeof(settings->menu.driver));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -64,6 +64,13 @@ typedef enum
|
||||
MENU_HELP_LAST
|
||||
} menu_help_type_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MENU_VIDEO_DRIVER_GENERIC = 0,
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||
} menu_video_driver_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *userdata;
|
||||
@ -132,6 +139,7 @@ typedef struct menu_ctx_driver
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
bool (*load_image)(void *data, menu_image_type_t type);
|
||||
const char *ident;
|
||||
menu_video_driver_type_t type;
|
||||
int (*environ_cb)(menu_environ_cb_t type, void *data);
|
||||
bool (*perform_action)(void* data, unsigned action);
|
||||
} menu_ctx_driver_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user