(RMenu) Fixes

This commit is contained in:
twinaphex 2015-03-21 22:51:25 +01:00
parent 84f9f64f47
commit 4bc9514197

View File

@ -93,7 +93,8 @@ static void rmenu_render_messagebox(const char *message)
struct font_params font_parms;
size_t i, j;
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)
return;
@ -130,9 +131,9 @@ static void rmenu_render_messagebox(const char *message)
font_parms.scale = FONT_SIZE_NORMAL;
font_parms.color = WHITE;
if (driver.video_data && driver.video_poke
&& driver.video_poke->set_osd_msg)
driver.video_poke->set_osd_msg(driver.video_data,
if (driver->video_data && driver->video_poke
&& driver->video_poke->set_osd_msg)
driver->video_poke->set_osd_msg(driver->video_data,
msg, &font_parms, NULL);
}
@ -155,6 +156,7 @@ static void rmenu_render(void)
unsigned menu_type = 0;
menu_handle_t *menu = menu_driver_resolve();
global_t *global = global_get_ptr();
driver_t *driver = driver_get_ptr();
runloop_t *runloop = rarch_main_get_ptr();
if (!menu)
@ -205,9 +207,9 @@ static void rmenu_render(void)
font_parms.scale = FONT_SIZE_NORMAL;
font_parms.color = WHITE;
if (driver.video_data && driver.video_poke
&& driver.video_poke->set_osd_msg)
driver.video_poke->set_osd_msg(driver.video_data,
if (driver->video_data && driver->video_poke
&& driver->video_poke->set_osd_msg)
driver->video_poke->set_osd_msg(driver->video_data,
title_buf, &font_parms, NULL);
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",
PACKAGE_VERSION, core_name, core_version);
if (driver.video_data && driver.video_poke
&& driver.video_poke->set_osd_msg)
driver.video_poke->set_osd_msg(driver.video_data,
if (driver->video_data && driver->video_poke
&& driver->video_poke->set_osd_msg)
driver->video_poke->set_osd_msg(driver->video_data,
title_msg, &font_parms, NULL);
j = 0;
@ -280,40 +282,42 @@ static void rmenu_render(void)
font_parms.scale = FONT_SIZE_NORMAL;
font_parms.color = WHITE;
if (driver.video_data && driver.video_poke
&& driver.video_poke->set_osd_msg)
driver.video_poke->set_osd_msg(driver.video_data,
if (driver->video_data && driver->video_poke
&& driver->video_poke->set_osd_msg)
driver->video_poke->set_osd_msg(driver->video_data,
message, &font_parms, NULL);
font_parms.x = POSITION_EDGE_CENTER + POSITION_OFFSET;
if (driver.video_data && driver.video_poke
&& driver.video_poke->set_osd_msg)
driver.video_poke->set_osd_msg(driver.video_data,
if (driver->video_data && driver->video_poke
&& driver->video_poke->set_osd_msg)
driver->video_poke->set_osd_msg(driver->video_data,
type_str_buf, &font_parms, NULL);
}
}
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)
return;
if (menu_texture_inited)
return;
if (!driver.video_data)
if (!driver->video_data)
return;
if (!driver.video_poke)
if (!driver->video_poke)
return;
if (!driver.video_poke->set_texture_enable)
if (!driver->video_poke->set_texture_enable)
return;
if (!menu_texture)
return;
if (!menu_texture->pixels)
return;
driver.video_poke->set_texture_frame(driver.video_data,
driver->video_poke->set_texture_frame(
driver->video_data,
menu_texture->pixels,
true, menu->frame_buf.width, menu->frame_buf.height, 1.0f);
menu_texture_inited = true;