diff options
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r-- | apps/gui/option_select.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index ec8b474191..ff257a4925 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -467,6 +467,8 @@ bool option_screen(const struct settings_list *setting, | |||
467 | int oldvalue, nb_items = 0, selected = 0, temp_var; | 467 | int oldvalue, nb_items = 0, selected = 0, temp_var; |
468 | int *variable; | 468 | int *variable; |
469 | bool allow_wrap = setting->flags & F_NO_WRAP ? false : true; | 469 | bool allow_wrap = setting->flags & F_NO_WRAP ? false : true; |
470 | bool cb_on_select_only = | ||
471 | ((setting->flags & F_CB_ON_SELECT_ONLY) == F_CB_ON_SELECT_ONLY); | ||
470 | int var_type = setting->flags&F_T_MASK; | 472 | int var_type = setting->flags&F_T_MASK; |
471 | void (*function)(int) = NULL; | 473 | void (*function)(int) = NULL; |
472 | char *title; | 474 | char *title; |
@@ -554,12 +556,15 @@ bool option_screen(const struct settings_list *setting, | |||
554 | } | 556 | } |
555 | settings_save(); | 557 | settings_save(); |
556 | done = true; | 558 | done = true; |
559 | if (cb_on_select_only && function) | ||
560 | function(*variable); | ||
557 | } | 561 | } |
558 | else if(default_event_handler(action) == SYS_USB_CONNECTED) | 562 | else if(default_event_handler(action) == SYS_USB_CONNECTED) |
559 | return true; | 563 | return true; |
560 | /* callback */ | 564 | /* callback */ |
561 | if ( function ) | 565 | if (function && !cb_on_select_only) |
562 | function(*variable); | 566 | function(*variable); |
567 | |||
563 | /* if the volume is changing we need to let the skins know */ | 568 | /* if the volume is changing we need to let the skins know */ |
564 | if (function == sound_get_fn(SOUND_VOLUME)) | 569 | if (function == sound_get_fn(SOUND_VOLUME)) |
565 | global_status.last_volume_change = current_tick; | 570 | global_status.last_volume_change = current_tick; |