mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Add option to disable fallback animation
This commit is contained in:
@@ -70,6 +70,14 @@ static void xtreme_app_scene_interface_graphics_unlock_anims_changed(VariableIte
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void xtreme_app_scene_interface_graphics_fallback_anim_changed(VariableItem* item) {
|
||||
XtremeApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
XTREME_SETTINGS()->fallback_anim = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
void xtreme_app_scene_interface_graphics_on_enter(void* context) {
|
||||
XtremeApp* app = context;
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
@@ -121,6 +129,15 @@ void xtreme_app_scene_interface_graphics_on_enter(void* context) {
|
||||
variable_item_set_current_value_index(item, xtreme_settings->unlock_anims);
|
||||
variable_item_set_current_value_text(item, xtreme_settings->unlock_anims ? "ON" : "OFF");
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list,
|
||||
"Fallback Anim",
|
||||
2,
|
||||
xtreme_app_scene_interface_graphics_fallback_anim_changed,
|
||||
app);
|
||||
variable_item_set_current_value_index(item, xtreme_settings->fallback_anim);
|
||||
variable_item_set_current_value_text(item, xtreme_settings->fallback_anim ? "ON" : "OFF");
|
||||
|
||||
variable_item_list_set_enter_callback(
|
||||
var_item_list, xtreme_app_scene_interface_graphics_var_item_list_callback, app);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <power/power_service/power.h>
|
||||
#include <storage/storage.h>
|
||||
#include <assets_icons.h>
|
||||
#include <assets_dolphin_internal.h>
|
||||
|
||||
#include "views/bubble_animation_view.h"
|
||||
#include "views/one_shot_animation_view.h"
|
||||
@@ -387,6 +388,12 @@ static StorageAnimation*
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
uint32_t whole_weight = 0;
|
||||
|
||||
bool fallback = XTREME_SETTINGS()->fallback_anim;
|
||||
if(StorageAnimationList_size(animation_list) == dolphin_internal_size + 1 && !fallback) {
|
||||
// One ext anim and fallback disabled, dont skip current anim (current = only ext one)
|
||||
avoid_animation = NULL;
|
||||
}
|
||||
|
||||
StorageAnimationList_it_t it;
|
||||
bool unlock = XTREME_SETTINGS()->unlock_anims;
|
||||
for(StorageAnimationList_it(it, animation_list); !StorageAnimationList_end_p(it);) {
|
||||
@@ -399,6 +406,10 @@ static StorageAnimation*
|
||||
// Avoid repeating same animation twice
|
||||
valid = false;
|
||||
}
|
||||
if(strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME) == 0 && !fallback) {
|
||||
// Skip fallback animation
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if(valid) {
|
||||
whole_weight += manifest_info->weight;
|
||||
|
||||
@@ -39,6 +39,7 @@ void XTREME_SETTINGS_LOAD() {
|
||||
xtreme_settings->anim_speed = 100; // 100%
|
||||
xtreme_settings->cycle_anims = 0; // Meta.txt
|
||||
xtreme_settings->unlock_anims = false; // OFF
|
||||
xtreme_settings->fallback_anim = true; // ON
|
||||
xtreme_settings->wii_menu = true; // ON
|
||||
xtreme_settings->lockscreen_time = true; // ON
|
||||
xtreme_settings->lockscreen_date = true; // ON
|
||||
|
||||
@@ -15,7 +15,7 @@ extern "C" {
|
||||
|
||||
#define MAX_PACK_NAME_LEN 32
|
||||
|
||||
#define XTREME_SETTINGS_VERSION (9)
|
||||
#define XTREME_SETTINGS_VERSION (10)
|
||||
#define XTREME_SETTINGS_PATH_OLD INT_PATH(XTREME_SETTINGS_FILE_NAME)
|
||||
#define XTREME_SETTINGS_PATH EXT_PATH(XTREME_SETTINGS_FILE_NAME)
|
||||
#define XTREME_SETTINGS_MAGIC (0x69)
|
||||
@@ -27,6 +27,7 @@ typedef struct {
|
||||
uint16_t anim_speed;
|
||||
int32_t cycle_anims;
|
||||
bool unlock_anims;
|
||||
bool fallback_anim;
|
||||
bool wii_menu;
|
||||
bool lockscreen_time;
|
||||
bool lockscreen_date;
|
||||
|
||||
Reference in New Issue
Block a user