Skip to content
Permalink
Browse files

Use 100 ms as the default GIF animation delay if it's not specified, …

…or very small.

This is compatible with IE, Mozilla, and Qt.
  • Loading branch information
slouken committed Oct 10, 2019
1 parent bebc661 commit e0288ec103809b02f407ee066209fe19a3bc35f8
Showing with 1 addition and 1 deletion.
  1. +1 −1 IMG_gif.c
@@ -332,7 +332,7 @@ IMG_LoadGIF_RW_Internal(SDL_RWops *src, SDL_bool load_anim)
frame->x = LM_to_uint(buf[0], buf[1]);
frame->y = LM_to_uint(buf[2], buf[3]);
frame->disposal = state.Gif89.disposal;
frame->delay = state.Gif89.delayTime*10;
frame->delay = (state.Gif89.delayTime < 2 ? 10 : state.Gif89.delayTime) * 10;

if (!load_anim) {
/* We only need one frame, we're done */

0 comments on commit e0288ec

Please sign in to comment.