This commit is contained in:
twinaphex 2020-03-07 22:41:10 +01:00
parent a8a2294f27
commit ead6c2b0dc
5 changed files with 155 additions and 124 deletions

View File

@ -1892,8 +1892,8 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
int y = 0;
int longest_width = 0;
size_t longest_len = 0;
unsigned width = video_info->width;
unsigned height = video_info->height;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
struct string_list *list = NULL;
/* Sanity check */
@ -1907,7 +1907,7 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
goto end;
/* Get coordinates of message box centre */
x = width / 2;
x = video_width / 2;
y = (int)(y_centre - (list->size - 1) * (mui->font_data.list.font_height / 2));
/* TODO/FIXME: Reduce text scale if width or height
@ -1941,8 +1941,8 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
y - mui->font_data.list.font_height / 2.0 - mui->margin * 2.0,
longest_width + mui->margin * 4.0,
mui->font_data.list.font_height * list->size + mui->margin * 4.0,
width,
height,
video_width,
video_height,
mui->colors.surface_background);
/* Print each line of the message */
@ -1954,8 +1954,9 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
gfx_display_draw_text(
mui->font_data.list.font, line,
x - longest_width/2.0,
y + i * mui->font_data.list.font_height + mui->font_data.list.font_height / 3,
width, height, mui->colors.list_text,
y + i * mui->font_data.list.font_height
+ mui->font_data.list.font_height / 3,
video_width, video_height, mui->colors.list_text,
TEXT_ALIGN_LEFT, 1.0f, false, 0, true);
}
@ -3478,12 +3479,17 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f
};
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool libretro_running = video_info->libretro_running;
float menu_wallpaper_opacity = video_info->menu_wallpaper_opacity;
float menu_framebuffer_opacity = video_info->menu_framebuffer_opacity;
/* Configure draw object */
draw.x = 0;
draw.y = 0;
draw.width = video_info->width;
draw.height = video_info->height;
draw.width = video_width;
draw.height = video_height;
draw.coords = NULL;
draw.matrix_data = NULL;
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
@ -3495,14 +3501,14 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
draw.pipeline.backend_data = NULL;
draw.color = draw_color;
if (mui->textures.bg && !video_info->libretro_running)
if (mui->textures.bg && !libretro_running)
{
draw.texture = mui->textures.bg;
/* We are showing a wallpaper - set opacity
* override to menu_wallpaper_opacity */
add_opacity = true;
opacity_override = video_info->menu_wallpaper_opacity;
opacity_override = menu_wallpaper_opacity;
}
else
{
@ -3514,10 +3520,10 @@ static void materialui_render_background(materialui_handle_t *mui, video_frame_i
/* We are not showing a wallpaper - if content
* is running, set opacity override to
* menu_framebuffer_opacity */
if (video_info->libretro_running)
if (libretro_running)
{
add_opacity = true;
opacity_override = video_info->menu_framebuffer_opacity;
opacity_override = menu_framebuffer_opacity;
}
}
@ -4870,6 +4876,8 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
settings_t *settings = config_get_ptr();
unsigned width = video_info->width;
unsigned height = video_info->height;
unsigned
materialui_color_theme = video_info->materialui_color_theme;
unsigned header_height = gfx_display_get_header_height();
size_t selection = menu_navigation_get_selection();
int list_x_offset;
@ -4892,13 +4900,13 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
mui->font_data.hint.raster_block.carr.coords.vertices = 0;
/* Update theme colours, if required */
if (mui->color_theme != video_info->materialui_color_theme)
if (mui->color_theme != materialui_color_theme)
{
materialui_prepare_colors(mui,
(enum materialui_color_theme)
video_info->materialui_color_theme);
materialui_color_theme);
mui->color_theme = (enum materialui_color_theme)
video_info->materialui_color_theme;
materialui_color_theme;
}
/* Update line ticker(s) */

View File

@ -1493,6 +1493,8 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool battery_level_enable = video_info->battery_level_enable;
bool timedate_enable = video_info->timedate_enable;
/* Initial ticker configuration */
if (use_smooth_ticker)
@ -1567,7 +1569,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
gfx_display_blend_end(video_info);
/* Battery */
if (video_info->battery_level_enable)
if (battery_level_enable)
{
gfx_display_ctx_powerstate_t powerstate;
char msg[12];
@ -1601,7 +1603,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
}
/* Timedate */
if (video_info->timedate_enable)
if (timedate_enable)
{
gfx_display_ctx_datetime_t datetime;
char timedate[255];
@ -2017,6 +2019,8 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
float *background_color = NULL;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
float menu_framebuffer_opacity = video_info->menu_framebuffer_opacity;
bool libretro_running = video_info->libretro_running;
#if 0
static bool reset = false;
@ -2066,7 +2070,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
}
ozone_set_color_theme(ozone, color_theme);
ozone_set_background_running_opacity(ozone, video_info->menu_framebuffer_opacity);
ozone_set_background_running_opacity(ozone, menu_framebuffer_opacity);
last_use_preferred_system_color_theme = use_preferred_system_color_theme;
}
@ -2089,11 +2093,11 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
ozone->raster_blocks.sidebar.carr.coords.vertices = 0;
/* Background */
if (video_info->libretro_running &&
(video_info->menu_framebuffer_opacity < 1.0f))
if (libretro_running &&
(menu_framebuffer_opacity < 1.0f))
{
if (video_info->menu_framebuffer_opacity != last_framebuffer_opacity)
ozone_set_background_running_opacity(ozone, video_info->menu_framebuffer_opacity);
if (menu_framebuffer_opacity != last_framebuffer_opacity)
ozone_set_background_running_opacity(ozone, menu_framebuffer_opacity);
background_color = ozone->theme->background_libretro_running;
}

View File

@ -5037,6 +5037,8 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
bool border_filler_thickness_enable = settings->bools.menu_rgui_border_filler_thickness_enable;
unsigned aspect_ratio_lock = settings->uints.menu_rgui_aspect_ratio_lock;
bool border_filler_enable = settings->bools.menu_rgui_border_filler_enable;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
if (bg_filler_thickness_enable != rgui->bg_thickness)
{
@ -5143,8 +5145,8 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
/* > If aspect ratio is locked, have to rescale if window
* dimensions change */
if ((rgui->window_width != video_info->width) ||
(rgui->window_height != video_info->height))
if ((rgui->window_width != video_width) ||
(rgui->window_height != video_height))
{
if ((aspect_ratio_lock != RGUI_ASPECT_RATIO_LOCK_NONE) &&
!rgui->ignore_resize_events)
@ -5153,8 +5155,8 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
rgui_set_video_config(rgui, &rgui->menu_video_settings, true);
}
rgui->window_width = video_info->width;
rgui->window_height = video_info->height;
rgui->window_width = video_width;
rgui->window_height = video_height;
}
/* Handle pending thumbnail load operations */

View File

@ -574,6 +574,7 @@ static void stripes_draw_icon(
{
gfx_display_ctx_draw_t draw;
struct video_coords coords;
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
if (
(x < (-icon_size / 2.0f)) ||
@ -602,7 +603,7 @@ static void stripes_draw_icon(
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
draw.pipeline.id = 0;
if (video_info->xmb_shadows_enable)
if (xmb_shadows_enable)
{
gfx_display_set_alpha(stripes_coord_shadow, color[3] * 0.35f);
@ -645,6 +646,7 @@ static void stripes_draw_text(
uint32_t color;
uint8_t a8;
settings_t *settings;
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
if (alpha > stripes->alpha)
alpha = stripes->alpha;
@ -663,7 +665,7 @@ static void stripes_draw_text(
gfx_display_draw_text(font, str, x, y,
width, height, color, text_align, scale_factor,
video_info->xmb_shadows_enable,
xmb_shadows_enable,
stripes->shadow_offset, false);
}
@ -2799,19 +2801,20 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
const int min_thumb_size = 50;
bool render_background = false;
file_list_t *selection_buf = NULL;
unsigned width = video_info->width;
unsigned height = video_info->height;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
float xmb_alpha_factor = video_info->xmb_alpha_factor;
const float under_thumb_margin = 0.96;
float scale_factor = 0.0f;
float pseudo_font_length = 0.0f;
float stack_width = 285;
stripes_handle_t *stripes = (stripes_handle_t*)data;
stripes_handle_t *stripes = (stripes_handle_t*)data;
settings_t *settings = config_get_ptr();
if (!stripes)
return;
scale_factor = (settings->floats.menu_scale_factor * (float)width) / 1920.0f;
scale_factor = (settings->floats.menu_scale_factor * (float)video_width) / 1920.0f;
pseudo_font_length = stripes->icon_spacing_horizontal * 4 - stripes->icon_size / 4;
msg[0] = '\0';
@ -2825,14 +2828,14 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
stripes->raster_block2.carr.coords.vertices = 0;
gfx_display_set_alpha(stripes_coord_black, MIN(
(float)video_info->xmb_alpha_factor/100, stripes->alpha));
(float)xmb_alpha_factor / 100, stripes->alpha));
gfx_display_set_alpha(stripes_coord_white, stripes->alpha);
stripes_draw_bg(
stripes,
video_info,
width,
height);
video_width,
video_height);
selection = menu_navigation_get_selection();
@ -2871,10 +2874,10 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
stripes->categories_x_pos + stack_width + node->width,
0,
stripes->categories_x_pos + stack_width + stripes->categories_angle,
video_info->height,
video_height,
stripes->categories_x_pos + stack_width + stripes->categories_angle + node->width,
video_info->height,
video_info->width, video_info->height,
video_height,
video_width, video_height,
&color[0]);
gfx_display_blend_begin(video_info);
@ -2921,8 +2924,8 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
texture,
x,
y,
width,
height,
video_width,
video_height,
1.0,
rotation,
scale_factor,
@ -2936,36 +2939,38 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
gfx_display_blend_end(video_info);
/* Vertical icons */
// if (stripes)
// stripes_draw_items(
// video_info,
// stripes,
// stripes->selection_buf_old,
// stripes->selection_ptr_old,
// (stripes_list_get_size(stripes, MENU_LIST_PLAIN) > 1)
// ? stripes->categories_selection_ptr :
// stripes->categories_selection_ptr_old,
// &stripes_item_color[0],
// width,
// height);
#if 0
if (stripes)
stripes_draw_items(
video_info,
stripes,
stripes->selection_buf_old,
stripes->selection_ptr_old,
(stripes_list_get_size(stripes, MENU_LIST_PLAIN) > 1)
? stripes->categories_selection_ptr :
stripes->categories_selection_ptr_old,
&stripes_item_color[0],
video_width,
video_height);
// selection_buf = menu_entries_get_selection_buf_ptr(0);
selection_buf = menu_entries_get_selection_buf_ptr(0);
// if (stripes)
// stripes_draw_items(
// video_info,
// stripes,
// selection_buf,
// selection,
// stripes->categories_selection_ptr,
// &stripes_item_color[0],
// width,
// height);
if (stripes)
stripes_draw_items(
video_info,
stripes,
selection_buf,
selection,
stripes->categories_selection_ptr,
&stripes_item_color[0],
video_width,
video_height);
#endif
font_driver_flush(video_info->width, video_info->height, stripes->font);
font_driver_flush(video_width, video_height, stripes->font);
font_driver_bind_block(stripes->font, NULL);
font_driver_flush(video_info->width, video_info->height, stripes->font2);
font_driver_flush(video_width, video_height, stripes->font2);
font_driver_bind_block(stripes->font2, NULL);
if (menu_input_dialog_get_display_kb())
@ -2988,7 +2993,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
if (render_background)
{
stripes_draw_dark_layer(stripes, video_info, width, height);
stripes_draw_dark_layer(stripes, video_info, video_width, video_height);
stripes_render_messagebox_internal(
video_info, stripes, msg);
}
@ -3007,11 +3012,11 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
stripes->textures.list[STRIPES_TEXTURE_POINTER],
pointer.x,
pointer.y,
width,
height);
video_width,
video_height);
}
gfx_display_unset_viewport(video_info->width, video_info->height);
gfx_display_unset_viewport(video_width, video_height);
}
static void stripes_layout_ps3(stripes_handle_t *stripes, int width, int height)

View File

@ -625,7 +625,9 @@ static xmb_node_t *xmb_copy_node(const xmb_node_t *old_node)
static float *xmb_gradient_ident(video_frame_info_t *video_info)
{
switch (video_info->xmb_color_theme)
unsigned xmb_color_theme = video_info->xmb_color_theme;
switch (xmb_color_theme)
{
case XMB_THEME_DARK_PURPLE:
return &gradient_dark_purple[0];
@ -764,6 +766,7 @@ static void xmb_draw_icon(
{
gfx_display_ctx_draw_t draw;
struct video_coords coords;
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
if (
(x < (-icon_size / 2.0f)) ||
@ -792,7 +795,7 @@ static void xmb_draw_icon(
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
draw.pipeline.id = 0;
if (video_info->xmb_shadows_enable)
if (xmb_shadows_enable)
{
gfx_display_set_alpha(coord_shadow, color[3] * 0.35f);
@ -834,6 +837,7 @@ static void xmb_draw_text(
{
uint32_t color;
uint8_t a8;
bool xmb_shadows_enable;
settings_t *settings;
if (alpha > xmb->alpha)
@ -845,15 +849,16 @@ static void xmb_draw_text(
if (a8 == 0)
return;
settings = config_get_ptr();
color = FONT_COLOR_RGBA(
settings = config_get_ptr();
color = FONT_COLOR_RGBA(
settings->uints.menu_font_color_red,
settings->uints.menu_font_color_green,
settings->uints.menu_font_color_blue, a8);
xmb_shadows_enable = video_info->xmb_shadows_enable;
gfx_display_draw_text(font, str, x, y,
width, height, color, text_align, scale_factor,
video_info->xmb_shadows_enable,
xmb_shadows_enable,
xmb->shadow_offset, false);
}
@ -3594,9 +3599,10 @@ static void xmb_render(void *data,
static bool xmb_shader_pipeline_active(video_frame_info_t *video_info)
{
unsigned menu_shader_pipeline = video_info->menu_shader_pipeline;
if (string_is_not_equal(menu_driver_ident(), "xmb"))
return false;
if (video_info->menu_shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER)
if (menu_shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER)
return false;
return true;
}
@ -3613,9 +3619,12 @@ static void xmb_draw_bg(
{
gfx_display_ctx_draw_t draw;
bool libretro_running = video_info->libretro_running;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool libretro_running = video_info->libretro_running;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
unsigned menu_shader_pipeline = video_info->menu_shader_pipeline;
unsigned xmb_color_theme = video_info->xmb_color_theme;
float menu_wallpaper_opacity = video_info->menu_wallpaper_opacity;
draw.x = 0;
draw.y = 0;
@ -3634,9 +3643,9 @@ static void xmb_draw_bg(
gfx_display_set_viewport(video_width, video_height);
#ifdef HAVE_SHADERPIPELINE
if (video_info->menu_shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER
if (menu_shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER
&&
(video_info->xmb_color_theme != XMB_THEME_WALLPAPER))
(xmb_color_theme != XMB_THEME_WALLPAPER))
{
draw.color = xmb_gradient_ident(video_info);
@ -3649,7 +3658,7 @@ static void xmb_draw_bg(
draw.pipeline.id = VIDEO_SHADER_MENU_2;
switch (video_info->menu_shader_pipeline)
switch (menu_shader_pipeline)
{
case XMB_SHADER_PIPELINE_RIBBON:
draw.pipeline.id = VIDEO_SHADER_MENU;
@ -3677,7 +3686,7 @@ static void xmb_draw_bg(
{
uintptr_t texture = draw.texture;
if (video_info->xmb_color_theme != XMB_THEME_WALLPAPER)
if (xmb_color_theme != XMB_THEME_WALLPAPER)
draw.color = xmb_gradient_ident(video_info);
if (libretro_running)
@ -3685,11 +3694,10 @@ static void xmb_draw_bg(
else
gfx_display_set_alpha(draw.color, coord_white[3]);
if (video_info->xmb_color_theme != XMB_THEME_WALLPAPER)
if (xmb_color_theme != XMB_THEME_WALLPAPER)
gfx_display_draw_gradient(&draw, video_info);
{
float override_opacity = video_info->menu_wallpaper_opacity;
bool add_opacity = false;
draw.texture = texture;
@ -3698,10 +3706,10 @@ static void xmb_draw_bg(
if (draw.texture)
draw.color = &coord_white[0];
if (libretro_running || video_info->xmb_color_theme == XMB_THEME_WALLPAPER)
if (libretro_running || xmb_color_theme == XMB_THEME_WALLPAPER)
add_opacity = true;
gfx_display_draw_bg(&draw, video_info, add_opacity, override_opacity);
gfx_display_draw_bg(&draw, video_info, add_opacity, menu_wallpaper_opacity);
}
}
@ -3888,6 +3896,7 @@ static void xmb_draw_fullscreen_thumbnails(
{
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
/* Check whether fullscreen thumbnails are visible */
if (xmb->fullscreen_thumbnail_alpha > 0.0f)
@ -4192,7 +4201,7 @@ static void xmb_draw_fullscreen_thumbnails(
/* Draw thumbnails */
/* > Configure shadow effect */
if (video_info->xmb_shadows_enable)
if (xmb_shadows_enable)
{
float shadow_offset = xmb->icon_size / 24.0f;
@ -4287,8 +4296,6 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
size_t percent_width = 0;
bool render_background = false;
file_list_t *selection_buf = NULL;
unsigned width = video_info->width;
unsigned height = video_info->height;
const float under_thumb_margin = 0.96f;
float left_thumbnail_margin_width = 0.0f;
float right_thumbnail_margin_width = 0.0f;
@ -4307,6 +4314,10 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
bool menu_xmb_vertical_thumbnails = settings->bools.menu_xmb_vertical_thumbnails;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
float xmb_alpha_factor = video_info->xmb_alpha_factor;
bool timedate_enable = video_info->timedate_enable;
bool battery_level_enable = video_info->battery_level_enable;
if (!xmb)
return;
@ -4318,16 +4329,16 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
pseudo_font_length = xmb->icon_spacing_horizontal * 4 - xmb->icon_size / 4.0f;
left_thumbnail_margin_width = xmb->icon_size * 3.4f;
right_thumbnail_margin_width =
(float)width - (xmb->icon_size / 6) -
(float)video_width - (xmb->icon_size / 6) -
(xmb->margins_screen_left * scale_mod[5]) -
xmb->icon_spacing_horizontal - pseudo_font_length;
thumbnail_margin_height_under = ((float)height * under_thumb_margin) - xmb->margins_screen_top - xmb->icon_size;
thumbnail_margin_height_full = (float)height - xmb->margins_title_top - ((xmb->icon_size / 4.0f) * 2.0f);
thumbnail_margin_height_under = ((float)video_height * under_thumb_margin) - xmb->margins_screen_top - xmb->icon_size;
thumbnail_margin_height_full = (float)video_height - xmb->margins_title_top - ((xmb->icon_size / 4.0f) * 2.0f);
left_thumbnail_margin_x = xmb->icon_size / 6.0f;
right_thumbnail_margin_x = (float)width - (xmb->icon_size / 6.0f) - right_thumbnail_margin_width;
right_thumbnail_margin_x = (float)video_width - (xmb->icon_size / 6.0f) - right_thumbnail_margin_width;
/* Configure shadow effect */
if (video_info->xmb_shadows_enable)
if (xmb_shadows_enable)
{
/* Drop shadow for thumbnails needs to be larger
* than for text/icons, and also needs to scale
@ -4352,14 +4363,15 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->raster_block2.carr.coords.vertices = 0;
gfx_display_set_alpha(coord_black, MIN(
(float)video_info->xmb_alpha_factor/100, xmb->alpha));
(float)xmb_alpha_factor / 100,
xmb->alpha));
gfx_display_set_alpha(coord_white, xmb->alpha);
xmb_draw_bg(
xmb,
video_info,
width,
height,
video_width,
video_height,
xmb->alpha,
xmb->textures.bg,
coord_black,
@ -4390,14 +4402,14 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
title_truncated, xmb->margins_title_left,
xmb->margins_title_top,
1, 1, TEXT_ALIGN_LEFT,
width, height, xmb->font);
video_width, video_height, xmb->font);
if (menu_core_enable)
{
menu_entries_get_core_title(title_msg, sizeof(title_msg));
xmb_draw_text(video_info, xmb, title_msg, xmb->margins_title_left,
height - xmb->margins_title_bottom, 1, 1, TEXT_ALIGN_LEFT,
width, height, xmb->font);
video_height - xmb->margins_title_bottom, 1, 1, TEXT_ALIGN_LEFT,
video_width, video_height, xmb->font);
}
rotate_draw.matrix = &mymat;
@ -4602,7 +4614,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
/* Clock image */
gfx_display_set_alpha(item_color, MIN(xmb->alpha, 1.00f));
if (video_info->battery_level_enable)
if (battery_level_enable)
{
gfx_display_ctx_powerstate_t powerstate;
char msg[12];
@ -4633,10 +4645,10 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
(powerstate.percent > 20)? XMB_TEXTURE_BATTERY_40 :
XMB_TEXTURE_BATTERY_20
],
width - (xmb->icon_size / 2) - x_pos_icon,
video_width - (xmb->icon_size / 2) - x_pos_icon,
xmb->icon_size,
width,
height,
video_width,
video_height,
1,
0,
1,
@ -4650,13 +4662,13 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->font, msg, (unsigned)strlen(msg), 1);
xmb_draw_text(video_info, xmb, msg,
width - xmb->margins_title_left - x_pos,
video_width - xmb->margins_title_left - x_pos,
xmb->margins_title_top, 1, 1, TEXT_ALIGN_RIGHT,
width, height, xmb->font);
video_width, video_height, xmb->font);
}
}
if (video_info->timedate_enable)
if (timedate_enable)
{
gfx_display_ctx_datetime_t datetime;
char timedate[255];
@ -4674,10 +4686,10 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->icon_size,
&mymat,
xmb->textures.list[XMB_TEXTURE_CLOCK],
width - xmb->icon_size - x_pos,
video_width - xmb->icon_size - x_pos,
xmb->icon_size,
width,
height,
video_width,
video_height,
1,
0,
1,
@ -4698,9 +4710,9 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
x_pos = percent_width + (xmb->icon_size / 2.5);
xmb_draw_text(video_info, xmb, timedate,
width - xmb->margins_title_left - xmb->icon_size / 4 - x_pos,
video_width - xmb->margins_title_left - xmb->icon_size / 4 - x_pos,
xmb->margins_title_top, 1, 1, TEXT_ALIGN_RIGHT,
width, height, xmb->font);
video_width, video_height, xmb->font);
}
/* Arrow image */
@ -4720,8 +4732,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->margins_screen_top +
xmb->icon_size / 2.0 + xmb->icon_spacing_vertical
* xmb->active_item_factor,
width,
height,
video_width,
video_height,
xmb->textures_arrow_alpha,
0,
1,
@ -4795,8 +4807,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
texture,
x,
y,
width,
height,
video_width,
video_height,
1.0,
rotation,
scale_factor,
@ -4818,8 +4830,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
? xmb->categories_selection_ptr :
xmb->categories_selection_ptr_old,
&item_color[0],
width,
height);
video_width,
video_height);
selection_buf = menu_entries_get_selection_buf_ptr(0);
@ -4830,8 +4842,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
selection,
xmb->categories_selection_ptr,
&item_color[0],
width,
height);
video_width,
video_height);
font_driver_flush(video_width, video_height, xmb->font);
font_driver_bind_block(xmb->font, NULL);
@ -4863,7 +4875,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
if (render_background)
{
xmb_draw_dark_layer(xmb, video_info, width, height);
xmb_draw_dark_layer(xmb, video_info, video_width, video_height);
xmb_render_messagebox_internal(
video_info, xmb, msg);
}
@ -4882,8 +4894,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
xmb->textures.list[XMB_TEXTURE_POINTER],
pointer.x,
pointer.y,
width,
height);
video_width,
video_height);
}
gfx_display_unset_viewport(video_width, video_height);