diff options
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r-- | apps/gui/option_select.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index f6b15467a6..4b7ee60016 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -526,15 +526,14 @@ bool option_screen(const struct settings_list *setting, | |||
526 | continue; | 526 | continue; |
527 | else if (action == ACTION_STD_CANCEL) | 527 | else if (action == ACTION_STD_CANCEL) |
528 | { | 528 | { |
529 | bool show_cancel = false; | 529 | bool show_cancel = false, changed = false; |
530 | if (use_temp_var) | 530 | if (var_type == F_T_INT || var_type == F_T_UINT) |
531 | show_cancel = true; | ||
532 | else if (var_type == F_T_INT || var_type == F_T_UINT) | ||
533 | { | 531 | { |
534 | if (*variable != oldvalue) | 532 | if (*variable != oldvalue) |
535 | { | 533 | { |
536 | show_cancel = true; | 534 | show_cancel = true; |
537 | *variable = oldvalue; | 535 | *variable = oldvalue; |
536 | changed = true; | ||
538 | } | 537 | } |
539 | } | 538 | } |
540 | else | 539 | else |
@@ -545,8 +544,11 @@ bool option_screen(const struct settings_list *setting, | |||
545 | if (!use_temp_var) | 544 | if (!use_temp_var) |
546 | *(bool*)setting->setting = oldvalue==1?true:false; | 545 | *(bool*)setting->setting = oldvalue==1?true:false; |
547 | *variable = oldvalue; | 546 | *variable = oldvalue; |
547 | changed = true; | ||
548 | } | 548 | } |
549 | } | 549 | } |
550 | if (use_temp_var && changed) | ||
551 | show_cancel = true; | ||
550 | if (show_cancel) | 552 | if (show_cancel) |
551 | gui_syncsplash(HZ/2, ID2P(LANG_CANCEL)); | 553 | gui_syncsplash(HZ/2, ID2P(LANG_CANCEL)); |
552 | done = true; | 554 | done = true; |