mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-23 01:18:12 -07:00
Start storage service first to load xtreme early
This commit is contained in:
@@ -148,13 +148,6 @@ void XTREME_ASSETS_LOAD() {
|
||||
xtreme_assets.is_nsfw = strncmp(xtreme_settings->asset_pack, "NSFW", strlen("NSFW")) == 0;
|
||||
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
int32_t timeout = 5000;
|
||||
while(timeout > 0) {
|
||||
if(storage_sd_status(storage) == FSE_OK) break;
|
||||
furi_delay_ms(250);
|
||||
timeout -= 250;
|
||||
}
|
||||
|
||||
FileInfo info;
|
||||
FuriString* path = furi_string_alloc();
|
||||
furi_string_printf(path, XTREME_ASSETS_PATH "/%s", xtreme_settings->asset_pack);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void XTREME_ASSETS_LOAD();
|
||||
void XTREME_SETTINGS_LOAD();
|
||||
void XTREME_ASSETS_LOAD();
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#define TAG "XtremeSettings"
|
||||
|
||||
XtremeSettings xtreme_settings = {
|
||||
.loaded = false,
|
||||
.asset_pack = "",
|
||||
.anim_speed = 100, // 100%
|
||||
.cycle_anims = 0, // Meta.txt
|
||||
@@ -89,8 +88,6 @@ void XTREME_SETTINGS_LOAD() {
|
||||
}
|
||||
flipper_format_free(file);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
xtreme_settings.loaded = true;
|
||||
}
|
||||
|
||||
void XTREME_SETTINGS_SAVE() {
|
||||
@@ -131,12 +128,3 @@ void XTREME_SETTINGS_SAVE() {
|
||||
XtremeSettings* XTREME_SETTINGS() {
|
||||
return &xtreme_settings;
|
||||
}
|
||||
|
||||
XtremeSettings* XTREME_SETTINGS_WAIT() {
|
||||
if(furi_hal_is_normal_boot()) {
|
||||
while(!xtreme_settings.loaded) {
|
||||
furi_delay_ms(50);
|
||||
}
|
||||
}
|
||||
return &xtreme_settings;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ extern "C" {
|
||||
#define XTREME_ASSETS_PACK_NAME_LEN 32
|
||||
|
||||
typedef struct {
|
||||
bool loaded;
|
||||
char asset_pack[XTREME_ASSETS_PACK_NAME_LEN];
|
||||
uint32_t anim_speed;
|
||||
int32_t cycle_anims;
|
||||
@@ -41,7 +40,6 @@ typedef struct {
|
||||
|
||||
void XTREME_SETTINGS_SAVE();
|
||||
XtremeSettings* XTREME_SETTINGS();
|
||||
XtremeSettings* XTREME_SETTINGS_WAIT();
|
||||
|
||||
typedef struct {
|
||||
bool is_nsfw;
|
||||
|
||||
Reference in New Issue
Block a user