summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/option_select.c11
-rw-r--r--apps/gui/quickscreen.c17
2 files changed, 9 insertions, 19 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 8839f42e42..d7f27f64eb 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -470,7 +470,10 @@ bool option_screen(const struct settings_list *setting,
470 int *variable; 470 int *variable;
471 bool allow_wrap = setting->flags & F_NO_WRAP ? false : true; 471 bool allow_wrap = setting->flags & F_NO_WRAP ? false : true;
472 bool cb_on_select_only = 472 bool cb_on_select_only =
473 ((setting->flags & F_CB_ON_SELECT_ONLY) == F_CB_ON_SELECT_ONLY); 473 ((setting->flags & F_CB_ON_SELECT_ONLY) == F_CB_ON_SELECT_ONLY);
474 bool cb_on_changed =
475 ((setting->flags & F_CB_ON_SELECT_ONLY_IF_CHANGED) == F_CB_ON_SELECT_ONLY_IF_CHANGED);
476
474 int var_type = setting->flags&F_T_MASK; 477 int var_type = setting->flags&F_T_MASK;
475 void (*function)(int) = NULL; 478 void (*function)(int) = NULL;
476 char *title; 479 char *title;
@@ -561,8 +564,12 @@ bool option_screen(const struct settings_list *setting,
561 } 564 }
562 settings_save(); 565 settings_save();
563 done = true; 566 done = true;
567
564 if (cb_on_select_only && function) 568 if (cb_on_select_only && function)
565 function(*variable); 569 {
570 if (!cb_on_changed || (*variable != oldvalue))
571 function(*variable);
572 }
566 } 573 }
567 else if(default_event_handler(action) == SYS_USB_CONNECTED) 574 else if(default_event_handler(action) == SYS_USB_CONNECTED)
568 { 575 {
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 221dfe3111..109414336f 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -418,8 +418,6 @@ static int gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter
418int quick_screen_quick(int button_enter) 418int quick_screen_quick(int button_enter)
419{ 419{
420 struct gui_quickscreen qs; 420 struct gui_quickscreen qs;
421 bool oldshuffle = global_settings.playlist_shuffle;
422 int oldrepeat = global_settings.repeat_mode;
423#ifdef HAVE_ALBUMART 421#ifdef HAVE_ALBUMART
424 int old_album_art = global_settings.album_art; 422 int old_album_art = global_settings.album_art;
425#endif 423#endif
@@ -438,21 +436,6 @@ int quick_screen_quick(int button_enter)
438 if (ret & QUICKSCREEN_CHANGED) 436 if (ret & QUICKSCREEN_CHANGED)
439 { 437 {
440 settings_save(); 438 settings_save();
441 /* make sure repeat/shuffle/any other nasty ones get updated */
442 if ( oldrepeat != global_settings.repeat_mode &&
443 (audio_status() & AUDIO_STATUS_PLAY) )
444 {
445 audio_flush_and_reload_tracks();
446 }
447 if (oldshuffle != global_settings.playlist_shuffle
448 && audio_status() & AUDIO_STATUS_PLAY)
449 {
450 replaygain_update();
451 if (global_settings.playlist_shuffle)
452 playlist_randomise(NULL, current_tick, true);
453 else
454 playlist_sort(NULL, true);
455 }
456#ifdef HAVE_ALBUMART 439#ifdef HAVE_ALBUMART
457 if (old_album_art != global_settings.album_art) 440 if (old_album_art != global_settings.album_art)
458 set_albumart_mode(global_settings.album_art); 441 set_albumart_mode(global_settings.album_art);