@@ -1816,7 +1816,9 @@ static struct config_bool_setting *populate_settings_bool(
18161816 SETTING_BOOL ("savefiles_in_content_dir" , & settings -> bools .savefiles_in_content_dir , true, DEFAULT_SAVEFILES_IN_CONTENT_DIR , false);
18171817 SETTING_BOOL ("systemfiles_in_content_dir" , & settings -> bools .systemfiles_in_content_dir , true, DEFAULT_SYSTEMFILES_IN_CONTENT_DIR , false);
18181818 SETTING_BOOL ("screenshots_in_content_dir" , & settings -> bools .screenshots_in_content_dir , true, DEFAULT_SCREENSHOTS_IN_CONTENT_DIR , false);
1819- SETTING_BOOL ("quit_press_twice" , & settings -> bools .quit_press_twice , true, DEFAULT_QUIT_PRESS_TWICE , false);
1819+ SETTING_BOOL ("confirm_quit" , & settings -> bools .confirm_quit , true, DEFAULT_CONFIRM_QUIT , false);
1820+ SETTING_BOOL ("confirm_close" , & settings -> bools .confirm_close , true, DEFAULT_CONFIRM_CLOSE , false);
1821+ SETTING_BOOL ("confirm_reset" , & settings -> bools .confirm_reset , true, DEFAULT_CONFIRM_RESET , false);
18201822 SETTING_BOOL ("config_save_on_exit" , & settings -> bools .config_save_on_exit , true, DEFAULT_CONFIG_SAVE_ON_EXIT , false);
18211823 SETTING_BOOL ("remap_save_on_exit" , & settings -> bools .remap_save_on_exit , true, DEFAULT_REMAP_SAVE_ON_EXIT , false);
18221824 SETTING_BOOL ("show_hidden_files" , & settings -> bools .show_hidden_files , true, DEFAULT_SHOW_HIDDEN_FILES , false);
@@ -4551,6 +4553,20 @@ static bool config_load_file(global_t *global,
45514553 settings -> ints .content_favorites_size = (int )settings -> uints .content_history_size ;
45524554 }
45534555
4556+ /* Migrate "quit_press_twice" to "confirm_quit" */
4557+ {
4558+ const char * tmp_key = "quit_press_twice" ;
4559+ struct config_entry_list * tmp = config_get_entry (conf , tmp_key );
4560+ if (tmp )
4561+ {
4562+ configuration_set_bool (settings ,
4563+ settings -> bools .confirm_quit ,
4564+ string_is_equal (tmp -> value , "true" ) ? true : false);
4565+ RARCH_LOG ("[Config] Migrated \"%s\" to \"confirm_quit\" = \"%s\".\n" ,
4566+ tmp -> key , tmp -> value );
4567+ }
4568+ }
4569+
45544570 if (conf )
45554571 config_file_free (conf );
45564572 if (bool_settings )
@@ -5681,6 +5697,14 @@ bool config_save_file(const char *path)
56815697 for (i = 0 ; i < MAX_USERS ; i ++ )
56825698 input_config_save_keybinds_user (conf , i );
56835699
5700+ /* Remove unused "quit_press_twice" after migrating to "confirm_quit" */
5701+ {
5702+ const char * tmp_key = "quit_press_twice" ;
5703+ struct config_entry_list * tmp = config_get_entry (conf , tmp_key );
5704+ if (tmp )
5705+ config_unset (conf , tmp -> key );
5706+ }
5707+
56845708 ret = config_file_write (conf , path , true);
56855709 config_file_free (conf );
56865710
0 commit comments