DESKTOP_SETTINGS_LOAD

This commit is contained in:
RogueMaster
2022-09-17 04:01:07 -04:00
parent 7f0c5dc247
commit 33bfc34eef
5 changed files with 7 additions and 7 deletions

View File

@@ -202,7 +202,7 @@ const NotificationSequence clock_alert_startStop = {
static void desktop_view_main_dumbmode_changed(DesktopSettings* settings) { static void desktop_view_main_dumbmode_changed(DesktopSettings* settings) {
settings->is_dumbmode = !settings->is_dumbmode; settings->is_dumbmode = !settings->is_dumbmode;
SAVE_DESKTOP_SETTINGS(settings); DESKTOP_SETTINGS_SAVE(settings);
} }
static void clock_input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) { static void clock_input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) {
@@ -345,7 +345,7 @@ int32_t clock_app(void* p) {
free(plugin_state); free(plugin_state);
return 255; return 255;
} }
LOAD_DESKTOP_SETTINGS(plugin_state->desktop_settings); DESKTOP_SETTINGS_LOAD(plugin_state->desktop_settings);
// Set system callbacks // Set system callbacks
ViewPort* view_port = view_port_alloc(); ViewPort* view_port = view_port_alloc();
view_port_draw_callback_set(view_port, clock_render_callback, plugin_state); view_port_draw_callback_set(view_port, clock_render_callback, plugin_state);

View File

@@ -435,7 +435,7 @@ int32_t dice_app(void* p) {
return 255; return 255;
} }
LOAD_DESKTOP_SETTINGS(plugin_state->desktop_settings); DESKTOP_SETTINGS_LOAD(plugin_state->desktop_settings);
ViewPort* view_port = view_port_alloc(); ViewPort* view_port = view_port_alloc();
view_port_draw_callback_set(view_port, dice_render_callback, plugin_state); view_port_draw_callback_set(view_port, dice_render_callback, plugin_state);

View File

@@ -10,7 +10,7 @@
static void desktop_view_lock_menu_dumbmode_changed(bool isThisGameMode) { static void desktop_view_lock_menu_dumbmode_changed(bool isThisGameMode) {
DesktopSettingsApp* app = malloc(sizeof(DesktopSettingsApp)); DesktopSettingsApp* app = malloc(sizeof(DesktopSettingsApp));
LOAD_DESKTOP_SETTINGS(&app->settings); DESKTOP_SETTINGS_LOAD(&app->settings);
app->settings.is_dumbmode = isThisGameMode; app->settings.is_dumbmode = isThisGameMode;
DESKTOP_SETTINGS_SAVE(&app->settings); DESKTOP_SETTINGS_SAVE(&app->settings);
} }

View File

@@ -55,7 +55,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
if(event->type == InputTypeShort || event->type == InputTypeLong) { if(event->type == InputTypeShort || event->type == InputTypeLong) {
main_view->is_gamemode = false; main_view->is_gamemode = false;
DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings)); DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings));
LOAD_DESKTOP_SETTINGS(desktop_settings); DESKTOP_SETTINGS_LOAD(desktop_settings);
if(desktop_settings->is_dumbmode) main_view->is_gamemode = true; if(desktop_settings->is_dumbmode) main_view->is_gamemode = true;
free(desktop_settings); free(desktop_settings);
} }
@@ -145,7 +145,7 @@ DesktopMainView* desktop_main_alloc() {
DesktopMainView* main_view = malloc(sizeof(DesktopMainView)); DesktopMainView* main_view = malloc(sizeof(DesktopMainView));
main_view->is_gamemode = false; main_view->is_gamemode = false;
DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings)); DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings));
LOAD_DESKTOP_SETTINGS(desktop_settings); DESKTOP_SETTINGS_LOAD(desktop_settings);
if(desktop_settings->is_dumbmode) main_view->is_gamemode = true; if(desktop_settings->is_dumbmode) main_view->is_gamemode = true;
free(desktop_settings); free(desktop_settings);

View File

@@ -63,7 +63,7 @@ static void input_callback(InputEvent* input, void* ctx) {
static void render_callback(Canvas* canvas, void* ctx) { static void render_callback(Canvas* canvas, void* ctx) {
DolphinStats* stats = ctx; DolphinStats* stats = ctx;
DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings)); DesktopSettings* desktop_settings = malloc(sizeof(DesktopSettings));
LOAD_DESKTOP_SETTINGS(desktop_settings); DESKTOP_SETTINGS_LOAD(desktop_settings);
char level_str[12]; char level_str[12];
char xp_str[12]; char xp_str[12];