mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Gfx widgets) get rid of this early return - already done outside
This commit is contained in:
parent
6b5e9a3224
commit
797d3f871c
@ -35,16 +35,17 @@ static gfx_widget_generic_message_state_t p_w_generic_message_st = {
|
||||
{'\0'}
|
||||
};
|
||||
|
||||
static gfx_widget_generic_message_state_t* gfx_widget_generic_message_get_ptr()
|
||||
static gfx_widget_generic_message_state_t* gfx_widget_generic_message_get_ptr(void)
|
||||
{
|
||||
return &p_w_generic_message_st;
|
||||
}
|
||||
|
||||
static void gfx_widget_generic_message_fadeout(void *userdata)
|
||||
{
|
||||
gfx_widget_generic_message_state_t* state = gfx_widget_generic_message_get_ptr();
|
||||
gfx_animation_ctx_entry_t entry;
|
||||
gfx_animation_ctx_tag tag = (uintptr_t) &state->timer;
|
||||
gfx_widget_generic_message_state_t* state =
|
||||
gfx_widget_generic_message_get_ptr();
|
||||
gfx_animation_ctx_tag tag = (uintptr_t) &state->timer;
|
||||
|
||||
/* Start fade out animation */
|
||||
entry.cb = NULL;
|
||||
@ -60,12 +61,10 @@ static void gfx_widget_generic_message_fadeout(void *userdata)
|
||||
|
||||
void gfx_widget_set_message(char *msg)
|
||||
{
|
||||
gfx_widget_generic_message_state_t* state = gfx_widget_generic_message_get_ptr();
|
||||
gfx_timer_ctx_entry_t timer;
|
||||
gfx_animation_ctx_tag tag = (uintptr_t) &state->timer;
|
||||
|
||||
if (!gfx_widgets_active())
|
||||
return;
|
||||
gfx_widget_generic_message_state_t* state =
|
||||
gfx_widget_generic_message_get_ptr();
|
||||
gfx_animation_ctx_tag tag = (uintptr_t) &state->timer;
|
||||
|
||||
strlcpy(state->message, msg, sizeof(state->message));
|
||||
|
||||
@ -84,7 +83,8 @@ void gfx_widget_set_message(char *msg)
|
||||
|
||||
static void gfx_widget_generic_message_frame(void* data)
|
||||
{
|
||||
gfx_widget_generic_message_state_t* state = gfx_widget_generic_message_get_ptr();
|
||||
gfx_widget_generic_message_state_t* state =
|
||||
gfx_widget_generic_message_get_ptr();
|
||||
|
||||
if (state->alpha > 0.0f)
|
||||
{
|
||||
|
@ -63,13 +63,10 @@ static void gfx_widget_libretro_message_fadeout(void *userdata)
|
||||
|
||||
void gfx_widget_set_libretro_message(const char *msg, unsigned duration)
|
||||
{
|
||||
gfx_timer_ctx_entry_t timer;
|
||||
gfx_widget_libretro_message_state_t* state = gfx_widget_libretro_message_get_state();
|
||||
gfx_animation_ctx_tag tag = (uintptr_t) &state->timer;
|
||||
gfx_widget_font_data_t* font_regular = gfx_widgets_get_font_regular();
|
||||
gfx_timer_ctx_entry_t timer;
|
||||
|
||||
if (!gfx_widgets_active())
|
||||
return;
|
||||
|
||||
strlcpy(state->message, msg, sizeof(state->message));
|
||||
|
||||
|
@ -106,12 +106,7 @@ static void gfx_widgets_play_screenshot_flash(void)
|
||||
|
||||
void gfx_widget_screenshot_taken(const char *shotname, const char *filename)
|
||||
{
|
||||
gfx_widget_screenshot_state_t* state = NULL;
|
||||
|
||||
if (!gfx_widgets_active())
|
||||
return;
|
||||
|
||||
state = gfx_widget_screenshot_get_ptr();
|
||||
gfx_widget_screenshot_state_t* state = gfx_widget_screenshot_get_ptr();
|
||||
gfx_widgets_play_screenshot_flash();
|
||||
strlcpy(state->filename, filename, sizeof(state->filename));
|
||||
strlcpy(state->shotname, shotname, sizeof(state->shotname));
|
||||
@ -127,8 +122,8 @@ static void gfx_widget_screenshot_dispose(void *userdata)
|
||||
|
||||
static void gfx_widget_screenshot_end(void *userdata)
|
||||
{
|
||||
gfx_widget_screenshot_state_t* state = gfx_widget_screenshot_get_ptr();
|
||||
gfx_animation_ctx_entry_t entry;
|
||||
gfx_widget_screenshot_state_t* state = gfx_widget_screenshot_get_ptr();
|
||||
|
||||
entry.cb = gfx_widget_screenshot_dispose;
|
||||
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
|
||||
@ -230,7 +225,8 @@ static void gfx_widget_screenshot_frame(void* data)
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_widget_screenshot_iterate(unsigned width, unsigned height, bool fullscreen,
|
||||
static void gfx_widget_screenshot_iterate(unsigned width,
|
||||
unsigned height, bool fullscreen,
|
||||
const char *dir_assets, char *font_path,
|
||||
bool is_threaded)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user