diff --git a/scenes/config/settings/GeneralSettings.gd b/scenes/config/settings/GeneralSettings.gd index f575b888..932f46ae 100644 --- a/scenes/config/settings/GeneralSettings.gd +++ b/scenes/config/settings/GeneralSettings.gd @@ -90,9 +90,6 @@ func _on_Themes_item_selected(index): var theme_path : String = theme_id_map[index] RetroHubConfig.config.current_theme = theme_path - # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved - RetroHubUI.show_warning("Theme reloading is temporarily disabled for this version due to an internal bug in RetroHub's engine (Godot).\n \nYou'll have to restart RetroHub manually to switch themes.") - func _on_SetThemePath_pressed(): #warning-ignore:return_value_discarded OS.shell_open(RetroHubConfig._get_themes_dir()) diff --git a/source/Config.gd b/source/Config.gd index e13a22a5..411c85d8 100644 --- a/source/Config.gd +++ b/source/Config.gd @@ -490,7 +490,6 @@ func _load_theme() -> bool: theme_path = _get_themes_dir().path_join(current_theme) else: theme_path = _get_default_themes_dir().path_join(current_theme + ".pck") - # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved if not ProjectSettings.is_pack_loaded(theme_path): if not ProjectSettings.load_resource_pack(theme_path, false): push_error("Error when loading theme " + theme_path) @@ -535,10 +534,9 @@ func _unload_theme(): save_theme_config() theme_data = null - # FIXME: Theme hot-reloading is disabled until nasty GDScript bug is solved - #if !ProjectSettings.unload_resource_pack(theme_path): - # push_error("Error when unloading theme " + theme_path) - # return + if not ProjectSettings.unload_resource_pack(theme_path): + push_error("Error when unloading theme " + theme_path) + return func get_theme_config(key, default_value): if not _theme_config.has(key):