mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Cleaner anim cycle check
This commit is contained in:
@@ -201,13 +201,8 @@ static void animation_manager_start_new_idle(AnimationManager* animation_manager
|
||||
animation_storage_get_bubble_animation(animation_manager->current_animation);
|
||||
animation_manager->state = AnimationManagerStateIdle;
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
int32_t duration = 0;
|
||||
if (xtreme_settings->cycle_anims == 0) {
|
||||
duration = bubble_animation->duration;
|
||||
} else if (xtreme_settings->cycle_anims != -1) {
|
||||
duration = xtreme_settings->cycle_anims;
|
||||
}
|
||||
furi_timer_start(animation_manager->idle_animation_timer, duration * 1000);
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ? (bubble_animation->duration) : (xtreme_settings->cycle_anims);
|
||||
furi_timer_start(animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
}
|
||||
|
||||
static bool animation_manager_check_blocking(AnimationManager* animation_manager) {
|
||||
@@ -522,14 +517,9 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
const BubbleAnimation* bubble_animation = animation_storage_get_bubble_animation(
|
||||
animation_manager->current_animation);
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
int32_t duration = 0;
|
||||
if (xtreme_settings->cycle_anims == 0) {
|
||||
duration = bubble_animation->duration;
|
||||
} else if (xtreme_settings->cycle_anims != -1) {
|
||||
duration = xtreme_settings->cycle_anims;
|
||||
}
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ? (bubble_animation->duration) : (xtreme_settings->cycle_anims);
|
||||
furi_timer_start(
|
||||
animation_manager->idle_animation_timer, duration * 1000);
|
||||
animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user