mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(Ozone) Cleanups
This commit is contained in:
parent
448b988e62
commit
9786e08228
@ -2249,7 +2249,12 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
/* Thumbnail bar */
|
||||
if (ozone->show_thumbnail_bar)
|
||||
ozone_draw_thumbnail_bar(ozone, video_info);
|
||||
ozone_draw_thumbnail_bar(ozone,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
libretro_running,
|
||||
menu_framebuffer_opacity);
|
||||
|
||||
gfx_display_scissor_end(userdata,
|
||||
video_width,
|
||||
@ -2266,7 +2271,10 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
font_driver_bind_block(ozone->fonts.entries_label, NULL);
|
||||
|
||||
/* Draw fullscreen thumbnails, if required */
|
||||
ozone_draw_fullscreen_thumbnails(ozone, video_info);
|
||||
ozone_draw_fullscreen_thumbnails(ozone,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height);
|
||||
|
||||
/* Message box & OSK - second layer of text */
|
||||
ozone->raster_blocks.footer.carr.coords.vertices = 0;
|
||||
@ -2312,17 +2320,29 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
gfx_animation_push(&entry);
|
||||
}
|
||||
|
||||
ozone_draw_backdrop(video_info, float_min(ozone->animations.messagebox_alpha, 0.75f));
|
||||
ozone_draw_backdrop(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
float_min(ozone->animations.messagebox_alpha, 0.75f));
|
||||
|
||||
if (draw_osk)
|
||||
{
|
||||
const char *label = menu_input_dialog_get_label_buffer();
|
||||
const char *str = menu_input_dialog_get_buffer();
|
||||
|
||||
ozone_draw_osk(ozone, video_info, label, str);
|
||||
ozone_draw_osk(ozone,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
label, str);
|
||||
}
|
||||
else
|
||||
ozone_draw_messagebox(ozone, video_info, ozone->pending_message);
|
||||
ozone_draw_messagebox(ozone,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->pending_message);
|
||||
}
|
||||
|
||||
font_driver_flush(video_width, video_height, ozone->fonts.footer);
|
||||
|
@ -373,7 +373,13 @@ void ozone_refresh_sidebars(ozone_handle_t *ozone, unsigned video_height);
|
||||
|
||||
void ozone_entries_update_thumbnail_bar(ozone_handle_t *ozone, bool is_playlist, bool allow_animation);
|
||||
|
||||
void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_info);
|
||||
void ozone_draw_thumbnail_bar(
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
bool libretro_running,
|
||||
float menu_framebuffer_opacity);
|
||||
|
||||
void ozone_hide_fullscreen_thumbnails(ozone_handle_t *ozone, bool animate);
|
||||
void ozone_show_fullscreen_thumbnails(ozone_handle_t *ozone);
|
||||
|
@ -314,14 +314,14 @@ void ozone_draw_icon(
|
||||
video_width, video_height);
|
||||
}
|
||||
|
||||
void ozone_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
void ozone_draw_backdrop(
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
float alpha)
|
||||
{
|
||||
/* TODO: Replace this backdrop by a blur shader
|
||||
* on the whole screen if available */
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
gfx_display_set_alpha(ozone_backdrop, alpha);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
@ -337,7 +337,9 @@ void ozone_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
}
|
||||
|
||||
void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
const char *label, const char *str)
|
||||
{
|
||||
unsigned i;
|
||||
@ -345,9 +347,6 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
char message[2048];
|
||||
unsigned text_color;
|
||||
struct string_list *list= NULL;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
unsigned margin = 75 * scale_factor;
|
||||
@ -493,8 +492,11 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
string_list_free(list);
|
||||
}
|
||||
|
||||
void ozone_draw_messagebox(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info,
|
||||
void ozone_draw_messagebox(
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
const char *message)
|
||||
{
|
||||
unsigned i, y_position;
|
||||
@ -502,9 +504,6 @@ void ozone_draw_messagebox(ozone_handle_t *ozone,
|
||||
struct string_list *list = !string_is_empty(message)
|
||||
? string_split(message, "\n") : NULL;
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
unsigned width = video_width;
|
||||
unsigned height = video_height;
|
||||
|
||||
@ -587,7 +586,10 @@ end:
|
||||
}
|
||||
|
||||
void ozone_draw_fullscreen_thumbnails(
|
||||
ozone_handle_t *ozone, video_frame_info_t *video_info)
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height)
|
||||
{
|
||||
/* Check whether fullscreen thumbnails are visible */
|
||||
if (ozone->animations.fullscreen_thumbnail_alpha > 0.0f)
|
||||
@ -597,9 +599,6 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
* thumbnail when viewed fullscreen */
|
||||
gfx_thumbnail_t *right_thumbnail = &ozone->thumbnails.left;
|
||||
gfx_thumbnail_t *left_thumbnail = &ozone->thumbnails.right;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
unsigned width = video_width;
|
||||
unsigned height = video_height;
|
||||
int view_width = (int)width;
|
||||
|
@ -53,15 +53,29 @@ void ozone_draw_icon(
|
||||
|
||||
void ozone_restart_cursor_animation(ozone_handle_t *ozone);
|
||||
|
||||
void ozone_draw_backdrop(video_frame_info_t *video_info, float alpha);
|
||||
void ozone_draw_backdrop(
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
float alpha);
|
||||
|
||||
void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info,
|
||||
void ozone_draw_osk(
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
const char *label, const char *str);
|
||||
|
||||
void ozone_draw_messagebox(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info,
|
||||
void ozone_draw_messagebox(
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
const char *message);
|
||||
|
||||
void ozone_draw_fullscreen_thumbnails(
|
||||
ozone_handle_t *ozone, video_frame_info_t *video_info);
|
||||
ozone_handle_t *ozone,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height
|
||||
);
|
||||
|
@ -817,7 +817,11 @@ static void ozone_content_metadata_line(
|
||||
}
|
||||
|
||||
void ozone_draw_thumbnail_bar(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info)
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
bool libretro_running,
|
||||
float menu_framebuffer_opacity)
|
||||
{
|
||||
unsigned sidebar_width = ozone->dimensions.thumbnail_bar_width;
|
||||
unsigned thumbnail_width = sidebar_width - (ozone->dimensions.sidebar_entry_icon_padding * 2);
|
||||
@ -825,11 +829,6 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone,
|
||||
int left_thumbnail_y_position = 0;
|
||||
bool show_right_thumbnail = false;
|
||||
bool show_left_thumbnail = false;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool libretro_running = video_info->libretro_running;
|
||||
float menu_framebuffer_opacity = video_info->menu_framebuffer_opacity;
|
||||
unsigned sidebar_height = video_height - ozone->dimensions.header_height - ozone->dimensions.sidebar_gradient_height * 2 - ozone->dimensions.footer_height;
|
||||
unsigned x_position = video_width - (unsigned) ozone->animations.thumbnail_bar_position;
|
||||
int thumbnail_x_position = x_position + ozone->dimensions.sidebar_entry_icon_padding;
|
||||
|
Loading…
x
Reference in New Issue
Block a user