Start storage service first to load xtreme early

This commit is contained in:
Willy-JL
2023-05-10 12:13:38 +01:00
parent efe6dbf008
commit 33ff8e4506
13 changed files with 31 additions and 45 deletions

View File

@@ -15,7 +15,6 @@
#include "desktop/views/desktop_view_pin_timeout.h"
#include "desktop_i.h"
#include "helpers/pin_lock.h"
#include <xtreme/private.h>
#define TAG "Desktop"
@@ -347,9 +346,6 @@ int32_t desktop_srv(void* p) {
furi_hal_rtc_reset_flag(FuriHalRtcFlagResetPin);
}
XTREME_SETTINGS_LOAD();
XTREME_ASSETS_LOAD();
Desktop* desktop = desktop_alloc();
bool loaded = DESKTOP_SETTINGS_LOAD(&desktop->settings);

View File

@@ -80,7 +80,7 @@ Dolphin* dolphin_alloc() {
dolphin->state = dolphin_state_alloc();
dolphin->event_queue = furi_message_queue_alloc(8, sizeof(DolphinEvent));
dolphin->pubsub = furi_pubsub_alloc();
int32_t butthurt = XTREME_SETTINGS_WAIT()->butthurt_timer;
int32_t butthurt = XTREME_SETTINGS()->butthurt_timer;
dolphin->butthurt_timer = xTimerCreate(
NULL,
(butthurt > 0) ? (butthurt * 1000) : -1,

View File

@@ -1,6 +1,8 @@
#include <xtreme.h>
#include "gui_i.h"
#include <assets_icons.h>
#include <storage/storage.h>
#include <storage/storage_i.h>
#define TAG "GuiSrv"
@@ -589,6 +591,10 @@ Gui* gui_alloc() {
furi_check(gui->input_events);
furi_pubsub_subscribe(gui->input_events, gui_input_events_callback, gui);
Storage* storage = furi_record_open(RECORD_STORAGE);
gui_add_view_port(gui, storage->sd_gui.view_port, GuiLayerStatusBarLeft);
furi_record_close(RECORD_STORAGE);
return gui;
}

View File

@@ -3,6 +3,7 @@ App(
name="RGB Backlight",
apptype=FlipperAppType.SERVICE,
entry_point="rgb_backlight_srv",
order=10,
sdk_headers=[
"rgb_backlight.h",
],

View File

@@ -7,7 +7,7 @@ App(
requires=["storage_settings"],
provides=["storage_start"],
stack_size=3 * 1024,
order=44,
order=0,
sdk_headers=["storage.h"],
)

View File

@@ -54,10 +54,6 @@ Storage* storage_app_alloc() {
view_port_draw_callback_set(app->sd_gui.view_port, storage_app_sd_icon_draw_callback, app);
view_port_enabled_set(app->sd_gui.view_port, false);
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, app->sd_gui.view_port, GuiLayerStatusBarLeft);
furi_record_close(RECORD_GUI);
return app;
}