From ccc8d1aec292bf3b784857359168abe98a2de5ad Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 23 Apr 2017 13:32:16 +0200 Subject: [PATCH] Start using configuration_set_bool --- configuration.h | 4 ++++ menu/menu_driver.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configuration.h b/configuration.h index 380a2ba8a8..7e12d0113e 100644 --- a/configuration.h +++ b/configuration.h @@ -497,6 +497,10 @@ typedef struct settings } settings_t; +#define configuration_set_bool(settings, var, newvar) \ + settings->modified = true; \ + var = newvar + #define configuration_set_int(settings, var, newvar) \ settings->modified = true; \ var = newvar diff --git a/menu/menu_driver.c b/menu/menu_driver.c index f9f21fe8e9..fbee290901 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -162,7 +162,9 @@ static void bundle_decompressed(void *task_data, settings->bundle_assets_extract_last_version = settings->bundle_assets_extract_version_current; - settings->bundle_finished = true; + + configuration_set_bool(settings, settings->bundle_finished, true); + command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); } #endif @@ -185,7 +187,10 @@ static bool menu_init(menu_handle_t *menu_data) if (settings->menu_show_start_screen) { menu_dialog_push_pending(true, MENU_DIALOG_WELCOME); - settings->menu_show_start_screen = false; + + configuration_set_bool(settings, + settings->menu_show_start_screen, false); + if (settings->config_save_on_exit) command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); }