From 49fdbe8f0f9f8a928e0a275cba5e9e70842cf2ad Mon Sep 17 00:00:00 2001 From: Jose Falanga Date: Thu, 20 Aug 2026 00:21:35 -0300 Subject: [PATCH] fix: start AnimatedTextures unpaused to fix race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AnimatedTextures were created paused, relying on the gui_focus_changed handler to unpause them. But get_boxart is async — by the time the AnimatedTexture is set on the TextureRect, focus may already be on the card, so gui_focus_changed never fires for it. Animation stays paused. Start unpaused instead. The focus handler still pauses unfocused cards and unpauses focused ones, so only the active card animates. Bump to v0.1.17 --- core/boxart_itch.gd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/boxart_itch.gd b/core/boxart_itch.gd index 080d27d..a696696 100644 --- a/core/boxart_itch.gd +++ b/core/boxart_itch.gd @@ -449,9 +449,8 @@ func _fetch_image(url: String, cache_flags: int) -> Texture2D: ## Downloads a GIF and converts it to a Godot texture. When animated GIFs -## are enabled, extracts all frames and returns an AnimatedTexture (paused -## by default — the focus handler unpauses it). Otherwise extracts only -## the first frame and returns a static ImageTexture. +## are enabled, extracts all frames and returns an AnimatedTexture. Otherwise +## extracts only the first frame and returns a static ImageTexture. ## Results are cached in _animated_texture_cache keyed by URL. func _fetch_gif_as_texture(url: String, cache_flags: int) -> Texture2D: # Return cached result if available. @@ -569,7 +568,6 @@ func _extract_gif_frames(ffmpeg_bin: String, gif_path: String, frames_dir: Strin func _assemble_animated_texture(frame_files: PackedStringArray, frames_dir: String, delays: Array, url: String) -> AnimatedTexture: var anim_tex := AnimatedTexture.new() anim_tex.frames_count = frame_files.size() - anim_tex.pause = true # Start paused — focus handler unpauses. for i in frame_files.size(): var frame_path := frames_dir + "/" + frame_files[i]