mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-27 01:58:09 -07:00
Merge branch 'Flipper-XFW:dev' into dev
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
#define TAG "XtremeSettings"
|
||||
|
||||
XtremeSettings xtreme_settings = {
|
||||
.asset_pack = "", // SFW
|
||||
.asset_pack = "", // Default
|
||||
.anim_speed = 100, // 100%
|
||||
.cycle_anims = 0, // Meta.txt
|
||||
.unlock_anims = false, // OFF
|
||||
.fallback_anim = true, // ON
|
||||
.wii_menu = true, // ON
|
||||
.menu_style = MenuStyleWii, // Wii
|
||||
.lock_on_boot = false, // OFF
|
||||
.bad_pins_format = false, // OFF
|
||||
.allow_locked_rpc_commands = false, // OFF
|
||||
@@ -68,8 +68,8 @@ void XTREME_SETTINGS_LOAD() {
|
||||
x->fallback_anim = b;
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_bool(file, "wii_menu", &b, 1)) {
|
||||
x->wii_menu = b;
|
||||
if(flipper_format_read_uint32(file, "menu_style", &u, 1)) {
|
||||
x->menu_style = CLAMP(u, MenuStyleCount - 1U, 0U);
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_bool(file, "bad_pins_format", &b, 1)) {
|
||||
@@ -175,12 +175,14 @@ void XTREME_SETTINGS_SAVE() {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FlipperFormat* file = flipper_format_file_alloc(storage);
|
||||
if(flipper_format_file_open_always(file, XTREME_SETTINGS_PATH)) {
|
||||
uint32_t e;
|
||||
flipper_format_write_string_cstr(file, "asset_pack", x->asset_pack);
|
||||
flipper_format_write_uint32(file, "anim_speed", &x->anim_speed, 1);
|
||||
flipper_format_write_int32(file, "cycle_anims", &x->cycle_anims, 1);
|
||||
flipper_format_write_bool(file, "unlock_anims", &x->unlock_anims, 1);
|
||||
flipper_format_write_bool(file, "fallback_anim", &x->fallback_anim, 1);
|
||||
flipper_format_write_bool(file, "wii_menu", &x->wii_menu, 1);
|
||||
e = x->menu_style;
|
||||
flipper_format_write_uint32(file, "menu_style", &e, 1);
|
||||
flipper_format_write_bool(file, "bad_pins_format", &x->bad_pins_format, 1);
|
||||
flipper_format_write_bool(file, "allow_locked_rpc_commands", &x->allow_locked_rpc_commands, 1);
|
||||
flipper_format_write_bool(file, "lock_on_boot", &x->lock_on_boot, 1);
|
||||
@@ -189,7 +191,8 @@ void XTREME_SETTINGS_SAVE() {
|
||||
flipper_format_write_bool(file, "lockscreen_date", &x->lockscreen_date, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_statusbar", &x->lockscreen_statusbar, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_prompt", &x->lockscreen_prompt, 1);
|
||||
flipper_format_write_uint32(file, "battery_icon", &x->battery_icon, 1);
|
||||
e = x->battery_icon;
|
||||
flipper_format_write_uint32(file, "battery_icon", &e, 1);
|
||||
flipper_format_write_bool(file, "statusbar_clock", &x->statusbar_clock, 1);
|
||||
flipper_format_write_bool(file, "status_icons", &x->status_icons, 1);
|
||||
flipper_format_write_bool(file, "bar_borders", &x->bar_borders, 1);
|
||||
|
||||
+8
-2
@@ -24,6 +24,12 @@ typedef enum {
|
||||
BatteryIconCount,
|
||||
} BatteryIcon;
|
||||
|
||||
typedef enum {
|
||||
MenuStyleList,
|
||||
MenuStyleWii,
|
||||
MenuStyleCount,
|
||||
} MenuStyle;
|
||||
|
||||
typedef struct {
|
||||
bool is_nsfw; // TODO: replace with packs text support
|
||||
|
||||
@@ -32,7 +38,7 @@ typedef struct {
|
||||
int32_t cycle_anims;
|
||||
bool unlock_anims;
|
||||
bool fallback_anim;
|
||||
bool wii_menu;
|
||||
MenuStyle menu_style;
|
||||
bool lock_on_boot;
|
||||
bool bad_pins_format;
|
||||
bool allow_locked_rpc_commands;
|
||||
@@ -41,7 +47,7 @@ typedef struct {
|
||||
bool lockscreen_date;
|
||||
bool lockscreen_statusbar;
|
||||
bool lockscreen_prompt;
|
||||
uint32_t battery_icon;
|
||||
BatteryIcon battery_icon;
|
||||
bool statusbar_clock;
|
||||
bool status_icons;
|
||||
bool bar_borders;
|
||||
|
||||
Reference in New Issue
Block a user