mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
This can just be made global at this point lol
This commit is contained in:
@@ -23,13 +23,12 @@ static void animation_storage_free_animation(BubbleAnimation** storage_animation
|
||||
static BubbleAnimation* animation_storage_load_animation(const char* name);
|
||||
|
||||
void animation_handler_select_manifest() {
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
FuriString* anim_dir = furi_string_alloc();
|
||||
FuriString* manifest = furi_string_alloc();
|
||||
bool use_asset_pack = xtreme_settings->asset_pack[0] != '\0';
|
||||
bool use_asset_pack = xtreme_settings.asset_pack[0] != '\0';
|
||||
if(use_asset_pack) {
|
||||
furi_string_printf(
|
||||
anim_dir, "%s/%s/Anims", XTREME_ASSETS_PATH, xtreme_settings->asset_pack);
|
||||
anim_dir, "%s/%s/Anims", XTREME_ASSETS_PATH, xtreme_settings.asset_pack);
|
||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(storage_common_stat(storage, furi_string_get_cstr(manifest), NULL) == FSE_OK) {
|
||||
@@ -514,7 +513,7 @@ static BubbleAnimation* animation_storage_load_animation(const char* name) {
|
||||
if(!flipper_format_read_uint32(ff, "Active cycles", &u32value, 1)) break; //-V779
|
||||
animation->active_cycles = u32value;
|
||||
if(!flipper_format_read_uint32(ff, "Frame rate", &u32value, 1)) break;
|
||||
uint32_t anim_speed = XTREME_SETTINGS()->anim_speed;
|
||||
uint32_t anim_speed = xtreme_settings.anim_speed;
|
||||
u32value = (u32value * anim_speed) / 100;
|
||||
FURI_CONST_ASSIGN(animation->icon_animation.frame_rate, u32value < 1 ? 1 : u32value);
|
||||
if(!flipper_format_read_uint32(ff, "Duration", &u32value, 1)) break;
|
||||
|
||||
Reference in New Issue
Block a user