mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(gfx_widgets_progress_message) Cut down on another strlen
This commit is contained in:
parent
5e8987839e
commit
c5d70d49e5
@ -126,6 +126,7 @@ void gfx_widget_set_progress_message(
|
||||
const char *message, unsigned duration,
|
||||
unsigned priority, int8_t progress)
|
||||
{
|
||||
size_t _len;
|
||||
gfx_timer_ctx_entry_t timer;
|
||||
dispgfx_widget_t *p_dispwidget = dispwidget_get_ptr();
|
||||
gfx_widget_progress_message_state_t *state = &p_w_progress_message_st;
|
||||
@ -143,15 +144,14 @@ void gfx_widget_set_progress_message(
|
||||
return;
|
||||
|
||||
/* Cache message parameters */
|
||||
strlcpy(state->message, message, sizeof(state->message));
|
||||
_len = strlcpy(state->message, message, sizeof(state->message));
|
||||
state->priority = priority;
|
||||
state->progress = progress;
|
||||
|
||||
/* Cache text width */
|
||||
state->text_width = font_driver_get_message_width(
|
||||
font_regular->font,
|
||||
state->message,
|
||||
strlen(state->message),
|
||||
state->message, _len,
|
||||
1.0f);
|
||||
|
||||
/* Kill any existing timer/animation */
|
||||
|
Loading…
x
Reference in New Issue
Block a user