mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 12:48:27 +00:00
Cut down on anim_get_ptr calls
This commit is contained in:
parent
a19c61ec7f
commit
c053a871d0
@ -1628,15 +1628,17 @@ static void rgui_init_particle_effect(rgui_t *rgui)
|
||||
}
|
||||
}
|
||||
|
||||
static void rgui_render_particle_effect(rgui_t *rgui,
|
||||
unsigned fb_width, unsigned fb_height)
|
||||
static void rgui_render_particle_effect(
|
||||
rgui_t *rgui,
|
||||
gfx_animation_t *p_anim,
|
||||
unsigned fb_width,
|
||||
unsigned fb_height)
|
||||
{
|
||||
size_t i;
|
||||
/* Give speed factor a long, awkward name to minimise
|
||||
* risk of clashing with specific particle effect
|
||||
* implementation variables... */
|
||||
float global_speed_factor = 1.0f;
|
||||
gfx_animation_t *p_anim = anim_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
float particle_effect_speed = settings ? settings->floats.menu_rgui_particle_effect_speed : 0.0f;
|
||||
uint16_t *frame_buf_data = NULL;
|
||||
@ -4061,7 +4063,7 @@ static void rgui_render(void *data,
|
||||
|
||||
/* Render particle effect, if required */
|
||||
if (rgui->particle_effect != RGUI_PARTICLE_EFFECT_NONE)
|
||||
rgui_render_particle_effect(rgui, fb_width, fb_height);
|
||||
rgui_render_particle_effect(rgui, p_anim, fb_width, fb_height);
|
||||
|
||||
/* We use a single ticker for all text animations,
|
||||
* with the following configuration: */
|
||||
@ -5940,8 +5942,6 @@ static int rgui_pointer_up(void *data,
|
||||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
unsigned header_height = p_disp->header_height;
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
|
||||
if (!rgui)
|
||||
@ -5957,6 +5957,8 @@ static int rgui_pointer_up(void *data,
|
||||
rgui->show_fs_thumbnail &&
|
||||
rgui->entry_has_thumbnail &&
|
||||
(rgui->fs_thumbnail.is_valid || (rgui->thumbnail_queue_size > 0));
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
unsigned header_height = p_disp->header_height;
|
||||
|
||||
/* Normal pointer input */
|
||||
if (show_fs_thumbnail)
|
||||
|
@ -3029,7 +3029,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
|
||||
static int xmb_draw_item(
|
||||
void *userdata,
|
||||
gfx_display_t *p_disp,
|
||||
gfx_display_t *p_disp,
|
||||
gfx_animation_t *p_anim,
|
||||
gfx_display_ctx_driver_t *dispctx,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
@ -3067,7 +3068,6 @@ static int xmb_draw_item(
|
||||
settings->uints.menu_xmb_thumbnail_scale_factor;
|
||||
bool menu_xmb_vertical_thumbnails = settings->bools.menu_xmb_vertical_thumbnails;
|
||||
bool menu_show_sublabels = settings->bools.menu_show_sublabels;
|
||||
gfx_animation_t *p_anim = anim_get_ptr();
|
||||
|
||||
/* Initial ticker configuration */
|
||||
if (use_smooth_ticker)
|
||||
@ -3479,6 +3479,7 @@ static int xmb_draw_item(
|
||||
static void xmb_draw_items(
|
||||
void *userdata,
|
||||
gfx_display_t *p_disp,
|
||||
gfx_animation_t *p_anim,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
bool xmb_shadows_enable,
|
||||
@ -3539,6 +3540,7 @@ static void xmb_draw_items(
|
||||
if (xmb_draw_item(
|
||||
userdata,
|
||||
p_disp,
|
||||
p_anim,
|
||||
dispctx,
|
||||
video_width,
|
||||
video_height,
|
||||
@ -4225,6 +4227,7 @@ static void xmb_draw_dark_layer(
|
||||
|
||||
static void xmb_draw_fullscreen_thumbnails(
|
||||
xmb_handle_t *xmb,
|
||||
gfx_animation_t *p_anim,
|
||||
void *userdata,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
@ -4285,7 +4288,6 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
bool menu_ticker_smooth = settings->bools.menu_ticker_smooth;
|
||||
enum gfx_animation_ticker_type
|
||||
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
gfx_animation_t *p_anim = anim_get_ptr();
|
||||
|
||||
/* Sanity check: Return immediately if this is
|
||||
* a menu without thumbnails and we are not currently
|
||||
@ -4674,6 +4676,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
unsigned menu_shader_pipeline = video_info->menu_shader_pipeline;
|
||||
float menu_wallpaper_opacity = video_info->menu_wallpaper_opacity;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
gfx_animation_t *p_anim = anim_get_ptr();
|
||||
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;
|
||||
bool input_dialog_display_kb = menu_input_dialog_get_display_kb();
|
||||
|
||||
@ -5234,6 +5237,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
xmb_draw_items(
|
||||
userdata,
|
||||
p_disp,
|
||||
p_anim,
|
||||
video_width,
|
||||
video_height,
|
||||
xmb_shadows_enable,
|
||||
@ -5252,6 +5256,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
xmb_draw_items(
|
||||
userdata,
|
||||
p_disp,
|
||||
p_anim,
|
||||
video_width,
|
||||
video_height,
|
||||
xmb_shadows_enable,
|
||||
@ -5271,6 +5276,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Draw fullscreen thumbnails, if required */
|
||||
xmb_draw_fullscreen_thumbnails(
|
||||
xmb,
|
||||
p_anim,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
|
Loading…
x
Reference in New Issue
Block a user