mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
(gfx widgets) get rid of more getter functions
This commit is contained in:
parent
dee807cb54
commit
fe38cd9cbc
@ -105,19 +105,6 @@ float* gfx_widgets_get_backdrop_orig(void)
|
||||
return gfx_widgets_backdrop_orig;
|
||||
}
|
||||
|
||||
/* Messages queue */
|
||||
unsigned gfx_widgets_get_last_video_width(void *data)
|
||||
{
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
return p_dispwidget->last_video_width;
|
||||
}
|
||||
|
||||
unsigned gfx_widgets_get_last_video_height(void *data)
|
||||
{
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
return p_dispwidget->last_video_height;
|
||||
}
|
||||
|
||||
/* Widgets list */
|
||||
const static gfx_widget_t* const widgets[] = {
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
|
@ -270,10 +270,6 @@ struct gfx_widget
|
||||
|
||||
float* gfx_widgets_get_backdrop_orig(void);
|
||||
|
||||
unsigned gfx_widgets_get_last_video_width(void *data);
|
||||
|
||||
unsigned gfx_widgets_get_last_video_height(void *data);
|
||||
|
||||
float gfx_widgets_get_thumbnail_scale_factor(
|
||||
const float dst_width, const float dst_height,
|
||||
const float image_width, const float image_height);
|
||||
|
@ -168,7 +168,7 @@ void gfx_widget_set_generic_message(void *data,
|
||||
{
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_generic_message_state_t *state = gfx_widget_generic_message_get_state();
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget);
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
int text_width = 0;
|
||||
gfx_widget_font_data_t *font_msg_queue = &p_dispwidget->gfx_widget_fonts.msg_queue;
|
||||
|
||||
@ -237,8 +237,8 @@ static void gfx_widget_generic_message_layout(
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_generic_message_state_t *state = gfx_widget_generic_message_get_state();
|
||||
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget);
|
||||
unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget);
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
unsigned last_video_height = p_dispwidget->last_video_height;
|
||||
unsigned divider_width = p_dispwidget->divider_width_1px;
|
||||
unsigned widget_padding = 0;
|
||||
int text_width = 0;
|
||||
|
@ -216,7 +216,7 @@ static void gfx_widget_libretro_message_layout(
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_libretro_message_state_t *state = gfx_widget_libretro_message_get_state();
|
||||
|
||||
unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget);
|
||||
unsigned last_video_height = p_dispwidget->last_video_height;
|
||||
unsigned divider_width = p_dispwidget->divider_width_1px;
|
||||
gfx_widget_font_data_t *font_msg_queue = &p_dispwidget->gfx_widget_fonts.msg_queue;
|
||||
|
||||
|
@ -527,8 +527,8 @@ static void gfx_widget_load_content_animation_layout(
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr();
|
||||
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget);
|
||||
unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget);
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
unsigned last_video_height = p_dispwidget->last_video_height;
|
||||
unsigned widget_padding = p_dispwidget->simple_widget_padding;
|
||||
|
||||
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
||||
@ -583,10 +583,8 @@ static void gfx_widget_load_content_animation_iterate(void *user_data,
|
||||
if (state->status == GFX_WIDGET_LOAD_CONTENT_BEGIN)
|
||||
{
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)user_data;
|
||||
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget);
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
unsigned widget_padding = p_dispwidget->simple_widget_padding;
|
||||
|
||||
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
||||
gfx_widget_font_data_t *font_bold = &p_dispwidget->gfx_widget_fonts.bold;
|
||||
|
||||
|
@ -185,8 +185,8 @@ static void gfx_widget_progress_message_layout(
|
||||
float bar_padding;
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_progress_message_state_t *state = gfx_widget_progress_message_get_ptr();
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget);
|
||||
unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget);
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
unsigned last_video_height = p_dispwidget->last_video_height;
|
||||
unsigned widget_padding = p_dispwidget->simple_widget_padding;
|
||||
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
||||
|
||||
|
@ -315,9 +315,9 @@ static void gfx_widget_volume_layout(
|
||||
void *data,
|
||||
bool is_threaded, const char *dir_assets, char *font_path)
|
||||
{
|
||||
gfx_widget_volume_state_t* state = gfx_widget_volume_get_ptr();
|
||||
unsigned last_video_width = gfx_widgets_get_last_video_width(data);
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
gfx_widget_volume_state_t* state = gfx_widget_volume_get_ptr();
|
||||
unsigned last_video_width = p_dispwidget->last_video_width;
|
||||
gfx_widget_font_data_t *font_regular = &p_dispwidget->gfx_widget_fonts.regular;
|
||||
|
||||
state->widget_height = font_regular->line_height * 4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user