remove confirm_on_exit menu option

This commit is contained in:
Brad Parker 2016-10-30 23:29:03 -04:00
parent 0ee9432aa4
commit 5d28029be8
13 changed files with 1 additions and 111 deletions

View File

@ -1714,13 +1714,6 @@ static void command_event_main_state(unsigned cmd)
void handle_quit_event(void)
{
#ifdef HAVE_MENU
settings_t *settings = config_get_ptr();
if (settings && settings->confirm_on_exit &&
menu_dialog_is_active())
return;
#endif
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
@ -1931,18 +1924,7 @@ bool command_event(enum event_command cmd, void *data)
core_unload();
#endif
break;
case CMD_EVENT_QUIT_CONFIRM:
handle_quit_event();
break;
case CMD_EVENT_QUIT:
#ifdef HAVE_MENU
if (settings && settings->confirm_on_exit &&
!menu_dialog_is_active() && !runloop_is_quit_confirm())
{
menu_dialog_show_message(MENU_DIALOG_QUIT_CONFIRM, MENU_ENUM_LABEL_CONFIRM_ON_EXIT);
break;
}
#endif
handle_quit_event();
break;
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:

View File

@ -60,7 +60,6 @@ enum event_command
CMD_EVENT_TAKE_SCREENSHOT,
/* Quits RetroArch. */
CMD_EVENT_QUIT,
CMD_EVENT_QUIT_CONFIRM,
/* Reinitialize all drivers. */
CMD_EVENT_REINIT,
/* Toggles cheevos hardcore mode. */

View File

@ -533,8 +533,6 @@ static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
/* Save configuration file on exit. */
static bool config_save_on_exit = true;
static bool confirm_on_exit = false;
static bool show_hidden_files = true;
static const bool overlay_hide_in_menu = true;

View File

@ -830,7 +830,6 @@ static int populate_settings_bool(settings_t *settings, struct config_bool_setti
SETTING_BOOL("sort_savefiles_enable", &settings->sort_savefiles_enable, true, default_sort_savefiles_enable, false);
SETTING_BOOL("sort_savestates_enable", &settings->sort_savestates_enable, true, default_sort_savestates_enable, false);
SETTING_BOOL("config_save_on_exit", &settings->config_save_on_exit, true, config_save_on_exit, false);
SETTING_BOOL("confirm_on_exit", &settings->confirm_on_exit, true, confirm_on_exit, false);
SETTING_BOOL("show_hidden_files", &settings->show_hidden_files, true, show_hidden_files, false);
SETTING_BOOL("input_autodetect_enable", &settings->input.autodetect_enable, true, input_autodetect_enable, false);
SETTING_BOOL("audio_rate_control", &settings->audio.rate_control, true, rate_control, false);

View File

@ -468,7 +468,6 @@ typedef struct settings
#endif
bool config_save_on_exit;
bool confirm_on_exit;
bool show_hidden_files;
#ifdef HAVE_LAKKA

View File

@ -2606,8 +2606,6 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
return "auto_overrides_enable";
case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT:
return "config_save_on_exit";
case MENU_ENUM_LABEL_CONFIRM_ON_EXIT:
return "confirm_on_exit";
case MENU_ENUM_LABEL_SHOW_HIDDEN_FILES:
return "show_hidden_files";
case MENU_ENUM_LABEL_VIDEO_SMOOTH:

View File

@ -110,27 +110,12 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
{
BIT64_SET(menu->state, MENU_STATE_POP_STACK);
menu_dialog_set_active(false);
if (menu_dialog_get_current_type() == MENU_DIALOG_QUIT_CONFIRM)
{
runloop_set_quit_confirm(true);
command_event(CMD_EVENT_QUIT_CONFIRM, NULL);
}
}
if (action == MENU_ACTION_CANCEL)
{
BIT64_SET(menu->state, MENU_STATE_POP_STACK);
menu_dialog_set_active(false);
if (menu_dialog_get_current_type() == MENU_DIALOG_QUIT_CONFIRM)
{
runloop_set_quit_confirm(false);
if (content_is_inited() &&
menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
}
}
break;
case ITERATE_TYPE_BIND:

View File

@ -4525,9 +4525,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CONFIRM_ON_EXIT,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CORE_SPECIFIC_CONFIG,
PARSE_ONLY_BOOL, false);

View File

@ -369,30 +369,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
}
if (runloop_cmd_press(trigger_input, RARCH_QUIT_KEY))
{
int should_we_quit = true;
if (!runloop_is_quit_confirm())
{
if (settings && settings->confirm_on_exit)
{
if (!menu_dialog_is_active() && content_is_inited())
{
if(menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
menu_display_toggle_set_reason(MENU_TOGGLE_REASON_MESSAGE);
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
}
menu_dialog_show_message(MENU_DIALOG_QUIT_CONFIRM, MENU_ENUM_LABEL_CONFIRM_ON_EXIT);
should_we_quit = false;
}
if ((settings && !settings->confirm_on_exit) ||
should_we_quit)
return MENU_ACTION_QUIT;
}
}
return MENU_ACTION_QUIT;
mouse_enabled = settings->menu.mouse.enable;
#ifdef HAVE_OVERLAY

View File

@ -2719,12 +2719,6 @@ static bool setting_append_list(
bool_entries[0].default_value = config_save_on_exit;
bool_entries[0].flags = SD_FLAG_NONE;
bool_entries[1].target = &settings->confirm_on_exit;
bool_entries[1].name_enum_idx = MENU_ENUM_LABEL_CONFIRM_ON_EXIT;
bool_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CONFIRM_ON_EXIT;
bool_entries[1].default_value = confirm_on_exit;
bool_entries[1].flags = SD_FLAG_NONE;
bool_entries[2].target = &settings->show_hidden_files;
bool_entries[2].name_enum_idx = MENU_ENUM_LABEL_SHOW_HIDDEN_FILES;
bool_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES;

View File

@ -119,9 +119,6 @@
# Overwrites the config. #include's and comments are not preserved.
# config_save_on_exit = true
# Ask for confirmation on exit.
# confirm_on_exit = false
# Load up a specific config file based on the core being used.
# core_specific_config = false

View File

@ -121,7 +121,6 @@ static bool runloop_set_frame_limit = false;
static bool runloop_paused = false;
static bool runloop_idle = false;
static bool runloop_exec = false;
static bool runloop_quit_confirm = false;
static bool runloop_slowmotion = false;
static bool runloop_shutdown_initiated = false;
static bool runloop_core_shutdown_initiated = false;
@ -715,16 +714,6 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
return true;
}
bool runloop_is_quit_confirm(void)
{
return runloop_quit_confirm;
}
void runloop_set_quit_confirm(bool on)
{
runloop_quit_confirm = on;
}
/* Time to exit out of the main loop?
* Reasons for exiting:
* a) Shutdown environment callback was invoked.
@ -748,27 +737,6 @@ static INLINE int runloop_iterate_time_to_exit(bool quit_key_pressed)
if (!time_to_exit)
return 1;
#ifdef HAVE_MENU
if (!runloop_is_quit_confirm())
{
if (settings && settings->confirm_on_exit)
{
if (menu_dialog_is_active())
return 1;
if (content_is_inited())
{
if(menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
menu_display_toggle_set_reason(MENU_TOGGLE_REASON_MESSAGE);
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
}
menu_dialog_show_message(MENU_DIALOG_QUIT_CONFIRM, MENU_ENUM_LABEL_CONFIRM_ON_EXIT);
return 1;
}
}
#endif
if (runloop_exec)
runloop_exec = false;

View File

@ -219,9 +219,6 @@ void runloop_msg_queue_push(const char *msg, unsigned prio,
char* runloop_msg_queue_pull(void);
bool runloop_is_quit_confirm(void);
void runloop_set_quit_confirm(bool on);
bool runloop_ctl(enum runloop_ctl_state state, void *data);
RETRO_END_DECLS