diff --git a/lib/xtreme/assets.c b/lib/xtreme/assets.c index f8f6e780b..d4775ae2b 100644 --- a/lib/xtreme/assets.c +++ b/lib/xtreme/assets.c @@ -159,7 +159,7 @@ void XTREME_ASSETS_LOAD() { for(size_t i = 0; i < ICON_PATHS_COUNT; i++) { if(ICON_PATHS[i].icon->original == NULL) { - if(ICON_PATHS[i].animated) { + if(ICON_PATHS[i].icon->frame_count > 1) { load_icon_animated(ICON_PATHS[i].icon, ICON_PATHS[i].path, p, f); } else { load_icon_static(ICON_PATHS[i].icon, ICON_PATHS[i].path, p, f); diff --git a/scripts/assets.py b/scripts/assets.py index a5147f6bc..e2055450a 100755 --- a/scripts/assets.py +++ b/scripts/assets.py @@ -182,7 +182,7 @@ class Main(App): icons_c.write("\n") icons.append((icon_name, width, height, frame_rate, frame_count)) p = dirpath.removeprefix(self.args.input_directory)[1:] - paths.append((1, icon_name, p.replace("\\", "/"))) + paths.append((icon_name, p.replace("\\", "/"))) else: # process icons for filename in filenames: @@ -206,7 +206,7 @@ class Main(App): icons_c.write("\n") icons.append((icon_name, width, height, 0, 1)) p = fullfilename.removeprefix(self.args.input_directory)[1:] - paths.append((0, icon_name, p.replace("\\", "/").rsplit(".", 1)[0])) + paths.append((icon_name, p.replace("\\", "/").rsplit(".", 1)[0])) # Create array of images: self.logger.debug("Finalizing source file") for name, width, height, frame_rate, frame_count in icons: @@ -226,8 +226,8 @@ const IconPath ICON_PATHS[] = { #if !defined(FURI_RAM_EXEC) && !defined(FURI_DEBUG) """ ) - for animated, name, path in paths: - icons_c.write(f' {{{animated}, &{name}, "{path}"}},\n') + for name, path in paths: + icons_c.write(f' {{&{name}, "{path}"}},\n') icons_c.write( """#endif }; @@ -250,7 +250,6 @@ const size_t ICON_PATHS_COUNT = COUNT_OF(ICON_PATHS); icons_h.write( """ typedef struct { - bool animated; const Icon* icon; const char* path; } IconPath;