mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-15 20:01:54 -07:00
Fix some settings API usage/setup
This commit is contained in:
@@ -340,7 +340,6 @@ void bt_close_rpc_connection(Bt* bt) {
|
||||
|
||||
static void bt_change_profile(Bt* bt, BtMessage* message) {
|
||||
if(furi_hal_bt_is_ble_gatt_gap_supported()) {
|
||||
bt_settings_load(&bt->bt_settings);
|
||||
bt_close_rpc_connection(bt);
|
||||
|
||||
FuriHalBtProfile furi_profile;
|
||||
|
||||
@@ -80,7 +80,7 @@ struct Desktop {
|
||||
|
||||
bool in_transition : 1;
|
||||
|
||||
Keybind keybinds[KeybindTypeCount][KeybindKeyCount];
|
||||
Keybinds keybinds;
|
||||
|
||||
FuriPubSub* ascii_events_pubsub;
|
||||
FuriPubSubSubscription* ascii_events_subscription;
|
||||
|
||||
@@ -18,12 +18,12 @@ bool DESKTOP_SETTINGS_LOAD(DesktopSettings* x) {
|
||||
DESKTOP_SETTINGS_VER);
|
||||
}
|
||||
|
||||
bool DESKTOP_KEYBINDS_SAVE(Keybind (*x)[KeybindTypeCount][KeybindKeyCount], size_t size) {
|
||||
bool DESKTOP_KEYBINDS_SAVE(Keybinds* x, size_t size) {
|
||||
return saved_struct_save(
|
||||
DESKTOP_KEYBINDS_PATH, x, size, DESKTOP_KEYBINDS_MAGIC, DESKTOP_KEYBINDS_VER);
|
||||
}
|
||||
|
||||
bool DESKTOP_KEYBINDS_LOAD(Keybind (*x)[KeybindTypeCount][KeybindKeyCount], size_t size) {
|
||||
bool DESKTOP_KEYBINDS_LOAD(Keybinds* x, size_t size) {
|
||||
bool ok = saved_struct_load(
|
||||
DESKTOP_KEYBINDS_PATH, x, size, DESKTOP_KEYBINDS_MAGIC, DESKTOP_KEYBINDS_VER);
|
||||
if(ok) {
|
||||
|
||||
@@ -51,10 +51,12 @@ typedef struct {
|
||||
bool auto_lock_with_pin;
|
||||
} DesktopSettings;
|
||||
|
||||
typedef Keybind Keybinds[KeybindTypeCount][KeybindKeyCount];
|
||||
|
||||
bool DESKTOP_SETTINGS_SAVE(DesktopSettings* x);
|
||||
|
||||
bool DESKTOP_SETTINGS_LOAD(DesktopSettings* x);
|
||||
|
||||
bool DESKTOP_KEYBINDS_SAVE(Keybind (*x)[KeybindTypeCount][KeybindKeyCount], size_t size);
|
||||
bool DESKTOP_KEYBINDS_SAVE(Keybinds* x, size_t size);
|
||||
|
||||
bool DESKTOP_KEYBINDS_LOAD(Keybind (*x)[KeybindTypeCount][KeybindKeyCount], size_t size);
|
||||
bool DESKTOP_KEYBINDS_LOAD(Keybinds* x, size_t size);
|
||||
|
||||
@@ -18,7 +18,6 @@ BtSettingsApp* bt_settings_app_alloc() {
|
||||
// Load settings
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
app->bt = furi_record_open(RECORD_BT);
|
||||
bt_settings_load(&app->bt->bt_settings);
|
||||
|
||||
// View Dispatcher and Scene Manager
|
||||
app->view_dispatcher = view_dispatcher_alloc();
|
||||
|
||||
@@ -62,8 +62,6 @@ class ApplicationsCGenerator:
|
||||
app_path = "/ext/apps"
|
||||
if app.fap_category:
|
||||
app_path += f"/{app.fap_category}"
|
||||
else:
|
||||
app_path += "/assets"
|
||||
app_path += f"/{app.appid}.fap"
|
||||
return f"""
|
||||
{{
|
||||
|
||||
Reference in New Issue
Block a user