From b6c9740ba395d6106306878d3ff9ae61df1b8396 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Wed, 6 Jul 2022 14:41:15 +0200 Subject: [PATCH] Get rid of gfx_timer_t typedef - replace with float --- gfx/gfx_animation.c | 2 +- gfx/gfx_animation.h | 6 ++---- gfx/gfx_widgets.h | 4 ++-- gfx/widgets/gfx_widget_achievement_popup.c | 2 +- gfx/widgets/gfx_widget_generic_message.c | 2 +- gfx/widgets/gfx_widget_libretro_message.c | 2 +- gfx/widgets/gfx_widget_load_content_animation.c | 2 +- gfx/widgets/gfx_widget_progress_message.c | 2 +- gfx/widgets/gfx_widget_screenshot.c | 2 +- gfx/widgets/gfx_widget_volume.c | 2 +- 10 files changed, 12 insertions(+), 14 deletions(-) diff --git a/gfx/gfx_animation.c b/gfx/gfx_animation.c index 45821bf384..45739c90f1 100644 --- a/gfx/gfx_animation.c +++ b/gfx/gfx_animation.c @@ -2221,7 +2221,7 @@ void gfx_animation_deinit(void) memset(p_anim, 0, sizeof(*p_anim)); } -void gfx_animation_timer_start(gfx_timer_t *timer, gfx_timer_ctx_entry_t *timer_entry) +void gfx_animation_timer_start(float *timer, gfx_timer_ctx_entry_t *timer_entry) { gfx_animation_ctx_entry_t entry; uintptr_t tag = (uintptr_t) timer; diff --git a/gfx/gfx_animation.h b/gfx/gfx_animation.h index 4fd3573c85..baa4679ad6 100644 --- a/gfx/gfx_animation.h +++ b/gfx/gfx_animation.h @@ -180,8 +180,6 @@ typedef struct gfx_animation_ctx_line_ticker_smooth bool fade_enabled; } gfx_animation_ctx_line_ticker_smooth_t; -typedef float gfx_timer_t; - typedef struct gfx_timer_ctx_entry { tween_cb cb; @@ -192,7 +190,7 @@ typedef struct gfx_timer_ctx_entry typedef struct gfx_delayed_animation { gfx_animation_ctx_entry_t entry; /* pointer alignment */ - gfx_timer_t timer; + float timer; } gfx_delayed_animation_t; typedef float (*easing_cb) (float, float, float, float); @@ -234,7 +232,7 @@ struct gfx_animation typedef struct gfx_animation gfx_animation_t; -void gfx_animation_timer_start(gfx_timer_t *timer, +void gfx_animation_timer_start(float *timer, gfx_timer_ctx_entry_t *timer_entry); bool gfx_animation_update( diff --git a/gfx/gfx_widgets.h b/gfx/gfx_widgets.h index f0f25264b3..368274b91b 100644 --- a/gfx/gfx_widgets.h +++ b/gfx/gfx_widgets.h @@ -129,8 +129,8 @@ typedef struct disp_widget_msg float alpha; float unfold; float hourglass_rotation; - gfx_timer_t hourglass_timer; /* float alignment */ - gfx_timer_t expiration_timer; /* float alignment */ + float hourglass_timer; /* float alignment */ + float expiration_timer; /* float alignment */ int8_t task_progress; /* How many tasks have used this notification? */ diff --git a/gfx/widgets/gfx_widget_achievement_popup.c b/gfx/widgets/gfx_widget_achievement_popup.c index 43037db91b..33ccef6ebb 100644 --- a/gfx/widgets/gfx_widget_achievement_popup.c +++ b/gfx/widgets/gfx_widget_achievement_popup.c @@ -50,7 +50,7 @@ struct gfx_widget_achievement_popup_state int queue_write_index; unsigned width; unsigned height; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ float unfold; float y; }; diff --git a/gfx/widgets/gfx_widget_generic_message.c b/gfx/widgets/gfx_widget_generic_message.c index 85cbbb80ed..4d674d042c 100644 --- a/gfx/widgets/gfx_widget_generic_message.c +++ b/gfx/widgets/gfx_widget_generic_message.c @@ -44,7 +44,7 @@ struct gfx_widget_generic_message_state unsigned message_duration; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ float bg_x; float bg_y_start; diff --git a/gfx/widgets/gfx_widget_libretro_message.c b/gfx/widgets/gfx_widget_libretro_message.c index ec30d8de7d..ea11319d34 100644 --- a/gfx/widgets/gfx_widget_libretro_message.c +++ b/gfx/widgets/gfx_widget_libretro_message.c @@ -43,7 +43,7 @@ struct gfx_widget_libretro_message_state unsigned message_duration; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ float bg_x; float bg_y_start; diff --git a/gfx/widgets/gfx_widget_load_content_animation.c b/gfx/widgets/gfx_widget_load_content_animation.c index 42eb3b8b7f..7c155afdc9 100644 --- a/gfx/widgets/gfx_widget_load_content_animation.c +++ b/gfx/widgets/gfx_widget_load_content_animation.c @@ -63,7 +63,7 @@ struct gfx_widget_load_content_animation_state unsigned bg_width; unsigned bg_height; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ float bg_x; float bg_y; float alpha; diff --git a/gfx/widgets/gfx_widget_progress_message.c b/gfx/widgets/gfx_widget_progress_message.c index dbeb7abe23..5ee2dae1d2 100644 --- a/gfx/widgets/gfx_widget_progress_message.c +++ b/gfx/widgets/gfx_widget_progress_message.c @@ -35,7 +35,7 @@ struct gfx_widget_progress_message_state unsigned priority; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ float alpha; float widget_x; float widget_y; diff --git a/gfx/widgets/gfx_widget_screenshot.c b/gfx/widgets/gfx_widget_screenshot.c index 3a7ecb66a3..402af0e9fa 100644 --- a/gfx/widgets/gfx_widget_screenshot.c +++ b/gfx/widgets/gfx_widget_screenshot.c @@ -41,7 +41,7 @@ struct gfx_widget_screenshot_state float scale_factor; float y; float alpha; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ char shotname[256]; char filename[256]; diff --git a/gfx/widgets/gfx_widget_volume.c b/gfx/widgets/gfx_widget_volume.c index 9240036efd..8b208573bd 100644 --- a/gfx/widgets/gfx_widget_volume.c +++ b/gfx/widgets/gfx_widget_volume.c @@ -57,7 +57,7 @@ struct gfx_widget_volume_state float text_alpha; float db; float percent; - gfx_timer_t timer; /* float alignment */ + float timer; /* float alignment */ bool mute; };