mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
(RMenu) Fixes
This commit is contained in:
parent
84f9f64f47
commit
4bc9514197
@ -93,7 +93,8 @@ static void rmenu_render_messagebox(const char *message)
|
|||||||
struct font_params font_parms;
|
struct font_params font_parms;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
struct string_list *list = NULL;
|
struct string_list *list = NULL;
|
||||||
menu_handle_t *menu = menu_driver_resolve();
|
menu_handle_t *menu = menu_driver_resolve();
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
@ -130,9 +131,9 @@ static void rmenu_render_messagebox(const char *message)
|
|||||||
font_parms.scale = FONT_SIZE_NORMAL;
|
font_parms.scale = FONT_SIZE_NORMAL;
|
||||||
font_parms.color = WHITE;
|
font_parms.color = WHITE;
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke
|
if (driver->video_data && driver->video_poke
|
||||||
&& driver.video_poke->set_osd_msg)
|
&& driver->video_poke->set_osd_msg)
|
||||||
driver.video_poke->set_osd_msg(driver.video_data,
|
driver->video_poke->set_osd_msg(driver->video_data,
|
||||||
msg, &font_parms, NULL);
|
msg, &font_parms, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,6 +156,7 @@ static void rmenu_render(void)
|
|||||||
unsigned menu_type = 0;
|
unsigned menu_type = 0;
|
||||||
menu_handle_t *menu = menu_driver_resolve();
|
menu_handle_t *menu = menu_driver_resolve();
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
runloop_t *runloop = rarch_main_get_ptr();
|
runloop_t *runloop = rarch_main_get_ptr();
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
@ -205,9 +207,9 @@ static void rmenu_render(void)
|
|||||||
font_parms.scale = FONT_SIZE_NORMAL;
|
font_parms.scale = FONT_SIZE_NORMAL;
|
||||||
font_parms.color = WHITE;
|
font_parms.color = WHITE;
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke
|
if (driver->video_data && driver->video_poke
|
||||||
&& driver.video_poke->set_osd_msg)
|
&& driver->video_poke->set_osd_msg)
|
||||||
driver.video_poke->set_osd_msg(driver.video_data,
|
driver->video_poke->set_osd_msg(driver->video_data,
|
||||||
title_buf, &font_parms, NULL);
|
title_buf, &font_parms, NULL);
|
||||||
|
|
||||||
core_name = global->menu.info.library_name;
|
core_name = global->menu.info.library_name;
|
||||||
@ -230,9 +232,9 @@ static void rmenu_render(void)
|
|||||||
snprintf(title_msg, sizeof(title_msg), "%s - %s %s",
|
snprintf(title_msg, sizeof(title_msg), "%s - %s %s",
|
||||||
PACKAGE_VERSION, core_name, core_version);
|
PACKAGE_VERSION, core_name, core_version);
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke
|
if (driver->video_data && driver->video_poke
|
||||||
&& driver.video_poke->set_osd_msg)
|
&& driver->video_poke->set_osd_msg)
|
||||||
driver.video_poke->set_osd_msg(driver.video_data,
|
driver->video_poke->set_osd_msg(driver->video_data,
|
||||||
title_msg, &font_parms, NULL);
|
title_msg, &font_parms, NULL);
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
@ -280,40 +282,42 @@ static void rmenu_render(void)
|
|||||||
font_parms.scale = FONT_SIZE_NORMAL;
|
font_parms.scale = FONT_SIZE_NORMAL;
|
||||||
font_parms.color = WHITE;
|
font_parms.color = WHITE;
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke
|
if (driver->video_data && driver->video_poke
|
||||||
&& driver.video_poke->set_osd_msg)
|
&& driver->video_poke->set_osd_msg)
|
||||||
driver.video_poke->set_osd_msg(driver.video_data,
|
driver->video_poke->set_osd_msg(driver->video_data,
|
||||||
message, &font_parms, NULL);
|
message, &font_parms, NULL);
|
||||||
|
|
||||||
font_parms.x = POSITION_EDGE_CENTER + POSITION_OFFSET;
|
font_parms.x = POSITION_EDGE_CENTER + POSITION_OFFSET;
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke
|
if (driver->video_data && driver->video_poke
|
||||||
&& driver.video_poke->set_osd_msg)
|
&& driver->video_poke->set_osd_msg)
|
||||||
driver.video_poke->set_osd_msg(driver.video_data,
|
driver->video_poke->set_osd_msg(driver->video_data,
|
||||||
type_str_buf, &font_parms, NULL);
|
type_str_buf, &font_parms, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rmenu_set_texture(void)
|
static void rmenu_set_texture(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_resolve();
|
menu_handle_t *menu = menu_driver_resolve();
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
if (menu_texture_inited)
|
if (menu_texture_inited)
|
||||||
return;
|
return;
|
||||||
if (!driver.video_data)
|
if (!driver->video_data)
|
||||||
return;
|
return;
|
||||||
if (!driver.video_poke)
|
if (!driver->video_poke)
|
||||||
return;
|
return;
|
||||||
if (!driver.video_poke->set_texture_enable)
|
if (!driver->video_poke->set_texture_enable)
|
||||||
return;
|
return;
|
||||||
if (!menu_texture)
|
if (!menu_texture)
|
||||||
return;
|
return;
|
||||||
if (!menu_texture->pixels)
|
if (!menu_texture->pixels)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
driver.video_poke->set_texture_frame(driver.video_data,
|
driver->video_poke->set_texture_frame(
|
||||||
|
driver->video_data,
|
||||||
menu_texture->pixels,
|
menu_texture->pixels,
|
||||||
true, menu->frame_buf.width, menu->frame_buf.height, 1.0f);
|
true, menu->frame_buf.width, menu->frame_buf.height, 1.0f);
|
||||||
menu_texture_inited = true;
|
menu_texture_inited = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user