Commit 0d794905 authored by a1ex's avatar a1ex
Browse files

Avoid redundant config save

--HG--
branch : 550d
parent a61c7471508c
...@@ -39,6 +39,7 @@ static int menu_timeout; ...@@ -39,6 +39,7 @@ static int menu_timeout;
static int menu_shown = 0; static int menu_shown = 0;
static int show_only_selected; // for ISO, kelvin... static int show_only_selected; // for ISO, kelvin...
static int edit_mode = 0; static int edit_mode = 0;
static int config_dirty = 0;
int get_menu_font_sel() int get_menu_font_sel()
{ {
...@@ -448,6 +449,8 @@ menu_entry_select( ...@@ -448,6 +449,8 @@ menu_entry_select(
{ {
if( entry->select ) entry->select( entry->priv ); if( entry->select ) entry->select( entry->priv );
} }
config_dirty = 1;
} }
/** Scroll side to side in the list of menus */ /** Scroll side to side in the list of menus */
...@@ -846,7 +849,11 @@ gui_stop_menu( void ) ...@@ -846,7 +849,11 @@ gui_stop_menu( void )
//~ powersave_set_config_for_menu(); // revert to your preferred setting for powersave //~ powersave_set_config_for_menu(); // revert to your preferred setting for powersave
extern int config_autosave; extern int config_autosave;
if (config_autosave) save_config(0); if (config_autosave && config_dirty)
{
save_config(0);
config_dirty = 0;
}
if (MENU_MODE && !get_halfshutter_pressed()) if (MENU_MODE && !get_halfshutter_pressed())
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment