mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Don't call anim_get_ptr inside gfx_thumbnail.c
This commit is contained in:
parent
e5e8e9b5d8
commit
5334ddd199
@ -430,8 +430,13 @@ void gfx_thumbnail_reset(gfx_thumbnail_t *thumbnail)
|
|||||||
* gfx_thumbnail_process_streams() for improved
|
* gfx_thumbnail_process_streams() for improved
|
||||||
* performance */
|
* performance */
|
||||||
void gfx_thumbnail_process_stream(
|
void gfx_thumbnail_process_stream(
|
||||||
gfx_thumbnail_path_data_t *path_data, enum gfx_thumbnail_id thumbnail_id,
|
gfx_thumbnail_path_data_t *path_data,
|
||||||
playlist_t *playlist, size_t idx, gfx_thumbnail_t *thumbnail, bool on_screen,
|
gfx_animation_t *p_anim,
|
||||||
|
enum gfx_thumbnail_id thumbnail_id,
|
||||||
|
playlist_t *playlist,
|
||||||
|
size_t idx,
|
||||||
|
gfx_thumbnail_t *thumbnail,
|
||||||
|
bool on_screen,
|
||||||
unsigned gfx_thumbnail_upscale_threshold,
|
unsigned gfx_thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails
|
bool network_on_demand_thumbnails
|
||||||
)
|
)
|
||||||
@ -446,7 +451,6 @@ void gfx_thumbnail_process_stream(
|
|||||||
* GFX_THUMBNAIL_STATUS_UNKNOWN */
|
* GFX_THUMBNAIL_STATUS_UNKNOWN */
|
||||||
if (thumbnail->status == GFX_THUMBNAIL_STATUS_UNKNOWN)
|
if (thumbnail->status == GFX_THUMBNAIL_STATUS_UNKNOWN)
|
||||||
{
|
{
|
||||||
gfx_animation_t *p_anim = anim_get_ptr();
|
|
||||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||||
|
|
||||||
/* Check if stream delay timer has elapsed */
|
/* Check if stream delay timer has elapsed */
|
||||||
@ -504,8 +508,10 @@ void gfx_thumbnail_process_stream(
|
|||||||
* performance */
|
* performance */
|
||||||
void gfx_thumbnail_process_streams(
|
void gfx_thumbnail_process_streams(
|
||||||
gfx_thumbnail_path_data_t *path_data,
|
gfx_thumbnail_path_data_t *path_data,
|
||||||
|
gfx_animation_t *p_anim,
|
||||||
playlist_t *playlist, size_t idx,
|
playlist_t *playlist, size_t idx,
|
||||||
gfx_thumbnail_t *right_thumbnail, gfx_thumbnail_t *left_thumbnail,
|
gfx_thumbnail_t *right_thumbnail,
|
||||||
|
gfx_thumbnail_t *left_thumbnail,
|
||||||
bool on_screen,
|
bool on_screen,
|
||||||
unsigned gfx_thumbnail_upscale_threshold,
|
unsigned gfx_thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails
|
bool network_on_demand_thumbnails
|
||||||
@ -526,7 +532,6 @@ void gfx_thumbnail_process_streams(
|
|||||||
{
|
{
|
||||||
/* Check if stream delay timer has elapsed */
|
/* Check if stream delay timer has elapsed */
|
||||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||||
gfx_animation_t *p_anim = anim_get_ptr();
|
|
||||||
float delta_time = p_anim->delta_time;
|
float delta_time = p_anim->delta_time;
|
||||||
bool request_right = false;
|
bool request_right = false;
|
||||||
bool request_left = false;
|
bool request_left = false;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
|
|
||||||
|
#include "gfx_animation.h"
|
||||||
#include "gfx_thumbnail_path.h"
|
#include "gfx_thumbnail_path.h"
|
||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
@ -204,8 +205,13 @@ void gfx_thumbnail_reset(gfx_thumbnail_t *thumbnail);
|
|||||||
* gfx_thumbnail_process_streams() for improved
|
* gfx_thumbnail_process_streams() for improved
|
||||||
* performance */
|
* performance */
|
||||||
void gfx_thumbnail_process_stream(
|
void gfx_thumbnail_process_stream(
|
||||||
gfx_thumbnail_path_data_t *path_data, enum gfx_thumbnail_id thumbnail_id,
|
gfx_thumbnail_path_data_t *path_data,
|
||||||
playlist_t *playlist, size_t idx, gfx_thumbnail_t *thumbnail, bool on_screen,
|
gfx_animation_t *p_anim,
|
||||||
|
enum gfx_thumbnail_id thumbnail_id,
|
||||||
|
playlist_t *playlist,
|
||||||
|
size_t idx,
|
||||||
|
gfx_thumbnail_t *thumbnail,
|
||||||
|
bool on_screen,
|
||||||
unsigned gfx_thumbnail_upscale_threshold,
|
unsigned gfx_thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails
|
bool network_on_demand_thumbnails
|
||||||
);
|
);
|
||||||
@ -224,8 +230,10 @@ void gfx_thumbnail_process_stream(
|
|||||||
* performance */
|
* performance */
|
||||||
void gfx_thumbnail_process_streams(
|
void gfx_thumbnail_process_streams(
|
||||||
gfx_thumbnail_path_data_t *path_data,
|
gfx_thumbnail_path_data_t *path_data,
|
||||||
|
gfx_animation_t *p_anim,
|
||||||
playlist_t *playlist, size_t idx,
|
playlist_t *playlist, size_t idx,
|
||||||
gfx_thumbnail_t *right_thumbnail, gfx_thumbnail_t *left_thumbnail,
|
gfx_thumbnail_t *right_thumbnail,
|
||||||
|
gfx_thumbnail_t *left_thumbnail,
|
||||||
bool on_screen,
|
bool on_screen,
|
||||||
unsigned gfx_thumbnail_upscale_threshold,
|
unsigned gfx_thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails
|
bool network_on_demand_thumbnails
|
||||||
|
@ -3168,20 +3168,27 @@ static bool materialui_render_process_entry_playlist_thumb_list(
|
|||||||
bool network_on_demand_thumbnails)
|
bool network_on_demand_thumbnails)
|
||||||
{
|
{
|
||||||
bool on_screen = first_entry_found && !last_entry_found;
|
bool on_screen = first_entry_found && !last_entry_found;
|
||||||
|
gfx_animation_t *p_anim = anim_get_ptr();
|
||||||
|
|
||||||
/* Load thumbnails for all on-screen entries
|
/* Load thumbnails for all on-screen entries
|
||||||
* and free thumbnails for all off-screen entries */
|
* and free thumbnails for all off-screen entries */
|
||||||
if (mui->secondary_thumbnail_enabled)
|
if (mui->secondary_thumbnail_enabled)
|
||||||
gfx_thumbnail_process_streams(
|
gfx_thumbnail_process_streams(
|
||||||
mui->thumbnail_path_data, mui->playlist, playlist_idx,
|
mui->thumbnail_path_data,
|
||||||
&node->thumbnails.primary, &node->thumbnails.secondary,
|
p_anim,
|
||||||
|
mui->playlist, playlist_idx,
|
||||||
|
&node->thumbnails.primary,
|
||||||
|
&node->thumbnails.secondary,
|
||||||
on_screen,
|
on_screen,
|
||||||
thumbnail_upscale_threshold,
|
thumbnail_upscale_threshold,
|
||||||
network_on_demand_thumbnails);
|
network_on_demand_thumbnails);
|
||||||
else
|
else
|
||||||
gfx_thumbnail_process_stream(
|
gfx_thumbnail_process_stream(
|
||||||
mui->thumbnail_path_data, GFX_THUMBNAIL_RIGHT,
|
mui->thumbnail_path_data,
|
||||||
mui->playlist, playlist_idx, &node->thumbnails.primary,
|
p_anim,
|
||||||
|
GFX_THUMBNAIL_RIGHT,
|
||||||
|
mui->playlist, playlist_idx,
|
||||||
|
&node->thumbnails.primary,
|
||||||
on_screen,
|
on_screen,
|
||||||
thumbnail_upscale_threshold,
|
thumbnail_upscale_threshold,
|
||||||
network_on_demand_thumbnails);
|
network_on_demand_thumbnails);
|
||||||
@ -3202,6 +3209,7 @@ static bool materialui_render_process_entry_playlist_dual_icon(
|
|||||||
unsigned thumbnail_upscale_threshold,
|
unsigned thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails)
|
bool network_on_demand_thumbnails)
|
||||||
{
|
{
|
||||||
|
gfx_animation_t *p_anim = anim_get_ptr();
|
||||||
bool on_screen = first_entry_found && !last_entry_found;
|
bool on_screen = first_entry_found && !last_entry_found;
|
||||||
|
|
||||||
/* Load thumbnails for all on-screen entries
|
/* Load thumbnails for all on-screen entries
|
||||||
@ -3209,8 +3217,11 @@ static bool materialui_render_process_entry_playlist_dual_icon(
|
|||||||
* > Note that secondary thumbnail is force
|
* > Note that secondary thumbnail is force
|
||||||
* enabled in dual icon mode */
|
* enabled in dual icon mode */
|
||||||
gfx_thumbnail_process_streams(
|
gfx_thumbnail_process_streams(
|
||||||
mui->thumbnail_path_data, mui->playlist, playlist_idx,
|
mui->thumbnail_path_data,
|
||||||
&node->thumbnails.primary, &node->thumbnails.secondary,
|
p_anim,
|
||||||
|
mui->playlist, playlist_idx,
|
||||||
|
&node->thumbnails.primary,
|
||||||
|
&node->thumbnails.secondary,
|
||||||
on_screen,
|
on_screen,
|
||||||
thumbnail_upscale_threshold,
|
thumbnail_upscale_threshold,
|
||||||
network_on_demand_thumbnails);
|
network_on_demand_thumbnails);
|
||||||
@ -3231,6 +3242,7 @@ static bool materialui_render_process_entry_playlist_desktop(
|
|||||||
unsigned thumbnail_upscale_threshold,
|
unsigned thumbnail_upscale_threshold,
|
||||||
bool network_on_demand_thumbnails)
|
bool network_on_demand_thumbnails)
|
||||||
{
|
{
|
||||||
|
gfx_animation_t *p_anim = anim_get_ptr();
|
||||||
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
gfx_thumbnail_state_t *p_gfx_thumb = gfx_thumb_get_ptr();
|
||||||
bool is_selected = (entry_idx == selection);
|
bool is_selected = (entry_idx == selection);
|
||||||
/* We want to load (and keep in memory)
|
/* We want to load (and keep in memory)
|
||||||
@ -3250,8 +3262,11 @@ static bool materialui_render_process_entry_playlist_desktop(
|
|||||||
* > Note that secondary thumbnail is force
|
* > Note that secondary thumbnail is force
|
||||||
* enabled */
|
* enabled */
|
||||||
gfx_thumbnail_process_streams(
|
gfx_thumbnail_process_streams(
|
||||||
mui->thumbnail_path_data, mui->playlist, playlist_idx,
|
mui->thumbnail_path_data,
|
||||||
&node->thumbnails.primary, &node->thumbnails.secondary,
|
p_anim,
|
||||||
|
mui->playlist, playlist_idx,
|
||||||
|
&node->thumbnails.primary,
|
||||||
|
&node->thumbnails.secondary,
|
||||||
is_on_screen,
|
is_on_screen,
|
||||||
thumbnail_upscale_threshold,
|
thumbnail_upscale_threshold,
|
||||||
network_on_demand_thumbnails);
|
network_on_demand_thumbnails);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user