Make sure the config is saved on exit.

May help #7724.
This commit is contained in:
Unknown W. Brackets 2015-12-25 19:39:52 -08:00
parent 6e48f907dd
commit 82e41a1392
2 changed files with 4 additions and 2 deletions

View File

@ -1090,6 +1090,8 @@ UI::EventReturn MainScreen::OnExit(UI::EventParams &e) {
#ifdef ANDROID_NDK_PROFILER
moncleanup();
#endif
// However, let's make sure the config was saved, since it may not have been.
g_Config.Save();
exit(0);
#endif

View File

@ -879,15 +879,15 @@ int main(int argc, char *argv[]) {
#ifndef _WIN32
delete joystick;
#endif
NativeShutdownGraphics();
NativeShutdown();
// Faster exit, thanks to the OS. Remove this if you want to debug shutdown
// The speed difference is only really noticable on Linux. On Windows you do notice it though
#ifndef MOBILE_DEVICE
exit(0);
#endif
NativeShutdownGraphics();
SDL_PauseAudio(1);
SDL_CloseAudio();
NativeShutdown();
#ifdef USING_EGL
EGL_Close();
#endif