Attempt to fix issue #3605

This commit is contained in:
twinaphex 2016-09-24 17:17:43 +02:00
parent 49a9f189e9
commit 9637e4ee29
2 changed files with 7 additions and 12 deletions

View File

@ -1596,17 +1596,8 @@ void command_event_save_current_config(int override_type)
RARCH_ERR("[overrides] %s\n", msg);
}
}
else
{
settings_t *settings = config_get_ptr();
/* Save last core-specific config to the default config location,
* needed on consoles for core switching and reusing last good
* config for new cores.
*/
if (settings->config_save_on_exit && !path_is_config_empty())
command_event_save_config(path_get_config(), msg, sizeof(msg));
}
else if (!path_is_config_empty())
command_event_save_config(path_get_config(), msg, sizeof(msg));
if (!string_is_empty(msg))
runloop_msg_queue_push(msg, 1, 180, true);

View File

@ -27,6 +27,7 @@
#endif
#include "frontend.h"
#include "../configuration.h"
#include "../ui/ui_companion_driver.h"
#include "../tasks/tasks_internal.h"
@ -45,7 +46,10 @@
**/
void main_exit(void *args)
{
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
settings_t *settings = config_get_ptr();
if (settings->config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
#ifdef HAVE_MENU
/* Do not want menu context to live any more. */