From 494a00bb2a3ce8d564b6648d6413924bff5c8ca9 Mon Sep 17 00:00:00 2001 From: Jose Falanga Date: Thu, 20 Aug 2026 00:45:21 -0300 Subject: [PATCH] fix: promote focus handler logs from DEBUG to INFO Default logger level is INFO, so all debug logs in _on_focus_changed were silently filtered. Promoted to INFO to diagnose why the handler never fires. Also log viewport connection on startup. Bump to v0.1.19 --- core/boxart_itch.gd | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/boxart_itch.gd b/core/boxart_itch.gd index e4f7c2c..1f41586 100644 --- a/core/boxart_itch.gd +++ b/core/boxart_itch.gd @@ -62,6 +62,7 @@ func _ready() -> void: logger.info("itch.io Art Provider loaded (animated_gifs=%s)" % str(_last_animated_setting)) add_child(http_image) get_viewport().gui_focus_changed.connect(_on_focus_changed) + logger.info("Connected gui_focus_changed signal on viewport: %s" % str(get_viewport())) ## Returns whether animated GIF covers are enabled in settings. @@ -75,41 +76,41 @@ func _on_focus_changed(control: Control) -> void: # Pause the previously focused animation. if _focused_animated_texture != null: if is_instance_valid(_focused_animated_texture): - logger.debug("Focus: pausing previous AnimatedTexture") + logger.info("Focus: pausing previous AnimatedTexture") _focused_animated_texture.pause = true _focused_animated_texture = null if control == null: - logger.debug("Focus: control is null") + logger.info("Focus: control is null") return - logger.debug("Focus: control=%s (%s)" % [control.name, control.get_class()]) + logger.info("Focus: control=%s (%s)" % [control.name, control.get_class()]) # Walk up the tree to find the GameCard parent. var card: Control = control while card != null: if not is_instance_valid(card): - logger.debug("Focus: invalid node while walking up") + logger.info("Focus: invalid node while walking up") return if card is GameCard: break card = card.get_parent() if card == null: - logger.debug("Focus: no GameCard ancestor found for %s" % control.name) + logger.info("Focus: no GameCard ancestor found for %s" % control.name) return # Check if the card's TextureRect has an AnimatedTexture. var texture_rect := card.get_node_or_null("%TextureRect") as TextureRect if texture_rect == null: - logger.debug("Focus: %%TextureRect not found in card %s" % card.name) + logger.info("Focus: %%TextureRect not found in card %s" % card.name) return if texture_rect.texture is AnimatedTexture: _focused_animated_texture = texture_rect.texture as AnimatedTexture _focused_animated_texture.pause = false - logger.debug("Focus: unpaused AnimatedTexture on %s (%d frames)" % [card.name, _focused_animated_texture.frames_count]) + logger.info("Focus: unpaused AnimatedTexture on %s (%d frames)" % [card.name, _focused_animated_texture.frames_count]) else: - logger.debug("Focus: texture on %s is %s (not AnimatedTexture)" % [card.name, str(texture_rect.texture)]) + logger.info("Focus: texture on %s is %s (not AnimatedTexture)" % [card.name, str(texture_rect.texture)]) ## Strips HTML srcset artifacts from a URL. Butlerd sometimes passes through