mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
(gfx_thumbnail) get rid of small getters
This commit is contained in:
parent
5aa675e059
commit
20371e5102
@ -82,33 +82,6 @@ void gfx_thumbnail_set_fade_missing(bool fade_missing)
|
||||
p_gfx_thumb->fade_missing = fade_missing;
|
||||
}
|
||||
|
||||
/* Getters */
|
||||
|
||||
/* Fetches current streaming thumbnails request delay */
|
||||
float gfx_thumbnail_get_stream_delay(void)
|
||||
{
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
return p_gfx_thumb->stream_delay;
|
||||
}
|
||||
|
||||
/* Fetches current 'fade in' animation duration */
|
||||
float gfx_thumbnail_get_fade_duration(void)
|
||||
{
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
return p_gfx_thumb->fade_duration;
|
||||
}
|
||||
|
||||
/* Fetches current enable state for missing
|
||||
* thumbnail 'fade in' animations */
|
||||
bool gfx_thumbnail_get_fade_missing(bool fade_missing)
|
||||
{
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
return p_gfx_thumb->fade_missing;
|
||||
}
|
||||
|
||||
/* Callbacks */
|
||||
|
||||
/* Fade animation callback - simply resets thumbnail
|
||||
|
@ -144,18 +144,6 @@ void gfx_thumbnail_set_fade_duration(float duration);
|
||||
* any 'thumbnail unavailable' notifications */
|
||||
void gfx_thumbnail_set_fade_missing(bool fade_missing);
|
||||
|
||||
/* Getters */
|
||||
|
||||
/* Fetches current streaming thumbnails request delay */
|
||||
float gfx_thumbnail_get_stream_delay(void);
|
||||
|
||||
/* Fetches current 'fade in' animation duration */
|
||||
float gfx_thumbnail_get_fade_duration(void);
|
||||
|
||||
/* Fetches current enable state for missing
|
||||
* thumbnail 'fade in' animations */
|
||||
bool gfx_thumbnail_get_fade_missing(bool fade_missing);
|
||||
|
||||
/* Core interface */
|
||||
|
||||
/* When called, prevents the handling of any pending
|
||||
|
@ -3224,7 +3224,8 @@ static bool materialui_render_process_entry_playlist_desktop(
|
||||
unsigned thumbnail_upscale_threshold,
|
||||
bool network_on_demand_thumbnails)
|
||||
{
|
||||
bool is_selected = (entry_idx == selection);
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
bool is_selected = (entry_idx == selection);
|
||||
/* We want to load (and keep in memory)
|
||||
* thumbnails for the currently selected
|
||||
* entry *and* the last entry for which
|
||||
@ -3302,7 +3303,7 @@ static bool materialui_render_process_entry_playlist_desktop(
|
||||
runtime_date_separator =
|
||||
(enum playlist_sublabel_last_played_date_separator_type)
|
||||
settings->uints.menu_timedate_date_separator;
|
||||
float fade_duration = gfx_thumbnail_get_fade_duration();
|
||||
float fade_duration = p_gfx_thumb->fade_duration;
|
||||
const struct playlist_entry *entry = NULL;
|
||||
const char *core_name = NULL;
|
||||
const char *runtime_str = NULL;
|
||||
@ -5997,6 +5998,7 @@ static void materialui_hide_fullscreen_thumbnails(
|
||||
materialui_handle_t *mui, bool animate)
|
||||
{
|
||||
uintptr_t alpha_tag = (uintptr_t)&mui->fullscreen_thumbnail_alpha;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Kill any existing fade in/out animations */
|
||||
gfx_animation_kill_by_tag(&alpha_tag);
|
||||
@ -6009,7 +6011,7 @@ static void materialui_hide_fullscreen_thumbnails(
|
||||
/* Configure fade out animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 0.0f;
|
||||
animation_entry.subject = &mui->fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
@ -6038,6 +6040,7 @@ static void materialui_show_fullscreen_thumbnails(
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
&mui->fullscreen_thumbnail_alpha;
|
||||
const char *thumbnail_label = NULL;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Before showing fullscreen thumbnails, must
|
||||
* ensure that any existing fullscreen thumbnail
|
||||
@ -6104,7 +6107,7 @@ static void materialui_show_fullscreen_thumbnails(
|
||||
/* Configure fade in animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 1.0f;
|
||||
animation_entry.subject = &mui->fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
@ -10292,9 +10295,10 @@ static void materialui_get_thumbnail_system(void *userdata, char *s, size_t len)
|
||||
|
||||
static void materialui_refresh_thumbnail_image(void *userdata, unsigned i)
|
||||
{
|
||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
bool refresh_enabled = false;
|
||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
bool refresh_enabled = false;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
if (!mui)
|
||||
return;
|
||||
@ -10318,7 +10322,7 @@ static void materialui_refresh_thumbnail_image(void *userdata, unsigned i)
|
||||
{
|
||||
file_list_t *list = menu_entries_get_selection_buf_ptr(0);
|
||||
materialui_node_t *node = NULL;
|
||||
float stream_delay = gfx_thumbnail_get_stream_delay();
|
||||
float stream_delay = p_gfx_thumb->stream_delay;
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
@ -3782,8 +3782,9 @@ void ozone_font_flush(
|
||||
|
||||
void ozone_hide_fullscreen_thumbnails(ozone_handle_t *ozone, bool animate)
|
||||
{
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
&ozone->animations.fullscreen_thumbnail_alpha;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Kill any existing fade in/out animations */
|
||||
gfx_animation_kill_by_tag(&alpha_tag);
|
||||
@ -3796,7 +3797,7 @@ void ozone_hide_fullscreen_thumbnails(ozone_handle_t *ozone, bool animate)
|
||||
/* Configure fade out animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 0.0f;
|
||||
animation_entry.subject = &ozone->animations.fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
@ -3817,10 +3818,11 @@ void ozone_show_fullscreen_thumbnails(ozone_handle_t *ozone)
|
||||
{
|
||||
menu_entry_t selected_entry;
|
||||
gfx_animation_ctx_entry_t animation_entry;
|
||||
const char *thumbnail_label = NULL;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
uintptr_t alpha_tag = (uintptr_t)&ozone->animations.fullscreen_thumbnail_alpha;
|
||||
uintptr_t scroll_tag = (uintptr_t)selection_buf;
|
||||
const char *thumbnail_label = NULL;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
uintptr_t alpha_tag = (uintptr_t)&ozone->animations.fullscreen_thumbnail_alpha;
|
||||
uintptr_t scroll_tag = (uintptr_t)selection_buf;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Before showing fullscreen thumbnails, must
|
||||
* ensure that any existing fullscreen thumbnail
|
||||
@ -3904,7 +3906,7 @@ void ozone_show_fullscreen_thumbnails(ozone_handle_t *ozone)
|
||||
/* Configure fade in animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 1.0f;
|
||||
animation_entry.subject = &ozone->animations.fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
@ -3920,8 +3922,10 @@ void ozone_show_fullscreen_thumbnails(ozone_handle_t *ozone)
|
||||
|
||||
void ozone_toggle_metadata_override(ozone_handle_t *ozone)
|
||||
{
|
||||
uintptr_t alpha_tag = (uintptr_t)&ozone->animations.left_thumbnail_alpha;
|
||||
gfx_animation_ctx_entry_t animation_entry;
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
&ozone->animations.left_thumbnail_alpha;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Kill any existing fade in/out animations */
|
||||
gfx_animation_kill_by_tag(&alpha_tag);
|
||||
@ -3929,7 +3933,7 @@ void ozone_toggle_metadata_override(ozone_handle_t *ozone)
|
||||
/* Set common animation parameters */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.subject = &ozone->animations.left_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
animation_entry.userdata = NULL;
|
||||
|
@ -3591,6 +3591,7 @@ static void xmb_hide_fullscreen_thumbnails(
|
||||
xmb_handle_t *xmb, bool animate)
|
||||
{
|
||||
uintptr_t alpha_tag = (uintptr_t)&xmb->fullscreen_thumbnail_alpha;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Kill any existing fade in/out animations */
|
||||
gfx_animation_kill_by_tag(&alpha_tag);
|
||||
@ -3603,7 +3604,7 @@ static void xmb_hide_fullscreen_thumbnails(
|
||||
/* Configure fade out animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 0.0f;
|
||||
animation_entry.subject = &xmb->fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
@ -3627,10 +3628,11 @@ static void xmb_show_fullscreen_thumbnails(
|
||||
{
|
||||
menu_entry_t selected_entry;
|
||||
gfx_animation_ctx_entry_t animation_entry;
|
||||
const char *core_name = NULL;
|
||||
const char *thumbnail_label = NULL;
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
const char *core_name = NULL;
|
||||
const char *thumbnail_label = NULL;
|
||||
uintptr_t alpha_tag = (uintptr_t)
|
||||
&xmb->fullscreen_thumbnail_alpha;
|
||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||
|
||||
/* Before showing fullscreen thumbnails, must
|
||||
* ensure that any existing fullscreen thumbnail
|
||||
@ -3710,7 +3712,7 @@ static void xmb_show_fullscreen_thumbnails(
|
||||
/* Configure fade in animation */
|
||||
animation_entry.easing_enum = EASING_OUT_QUAD;
|
||||
animation_entry.tag = alpha_tag;
|
||||
animation_entry.duration = gfx_thumbnail_get_fade_duration();
|
||||
animation_entry.duration = p_gfx_thumb->fade_duration;
|
||||
animation_entry.target_value = 1.0f;
|
||||
animation_entry.subject = &xmb->fullscreen_thumbnail_alpha;
|
||||
animation_entry.cb = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user