diff options
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r-- | apps/gui/option_select.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index d7f27f64eb..da6c703f40 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -472,7 +472,7 @@ bool option_screen(const struct settings_list *setting, | |||
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 = | 474 | bool cb_on_changed = |
475 | ((setting->flags & F_CB_ON_SELECT_ONLY_IF_CHANGED) == F_CB_ON_SELECT_ONLY_IF_CHANGED); | 475 | ((setting->flags & F_CB_ONLY_IF_CHANGED) == F_CB_ONLY_IF_CHANGED); |
476 | 476 | ||
477 | int var_type = setting->flags&F_T_MASK; | 477 | int var_type = setting->flags&F_T_MASK; |
478 | void (*function)(int) = NULL; | 478 | void (*function)(int) = NULL; |
@@ -578,8 +578,10 @@ bool option_screen(const struct settings_list *setting, | |||
578 | } | 578 | } |
579 | /* callback */ | 579 | /* callback */ |
580 | if (function && !cb_on_select_only) | 580 | if (function && !cb_on_select_only) |
581 | function(*variable); | 581 | { |
582 | 582 | if (!cb_on_changed || (*variable != oldvalue)) | |
583 | function(*variable); | ||
584 | } | ||
583 | /* if the volume is changing we need to let the skins know */ | 585 | /* if the volume is changing we need to let the skins know */ |
584 | if (function == sound_get_fn(SOUND_VOLUME)) | 586 | if (function == sound_get_fn(SOUND_VOLUME)) |
585 | global_status.last_volume_change = current_tick; | 587 | global_status.last_volume_change = current_tick; |