From e77e9b89d4cf058955739088465767920c4abbc7 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Tue, 14 Mar 2023 22:14:15 -0700 Subject: [PATCH] Tweak to prompt pop-up updated On my laptop the prompt was basically not coming up at all (only one animation step every few seconds), because apparently it was stuck doing "w += 0" due to how few ticks went by within the loop! :-D --- src/tuxpaint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 03492c12d..8b951fdb2 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -15275,7 +15275,7 @@ static int do_prompt_image_flash_snd(const char *const text, /* Calculate the amount by which to move to the next animation frame */ next_ms = SDL_GetTicks64(); - w += (next_ms - last_ms) * r_ttools.w / anim_ms; + w += max(1, ((next_ms - last_ms) * r_ttools.w) / anim_ms); last_ms = next_ms; }