From 8f0693f1be8d994c92aa5048a4e7a2f66c3a9ed6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Tue, 27 Jul 2004 09:56:14 +0000 Subject: [PATCH] commited fix by Leo Savernik . SVN-Revision: 1626 --- lib/app/setup.cpp | 2 +- lib/utils/configfile.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/app/setup.cpp b/lib/app/setup.cpp index b3c3641f9..1a56682fa 100644 --- a/lib/app/setup.cpp +++ b/lib/app/setup.cpp @@ -604,9 +604,9 @@ void Setup::audio(void) void Termination::shutdown(void) { + config->save(); SoundManager::get()->close_audio(); SDL_Quit(); - config->save(); } /* --- ABORT! --- */ diff --git a/lib/utils/configfile.cpp b/lib/utils/configfile.cpp index 46344222d..387a5e8b5 100644 --- a/lib/utils/configfile.cpp +++ b/lib/utils/configfile.cpp @@ -28,7 +28,7 @@ using namespace SuperTux; #ifdef WIN32 -const char * config_filename = "/st_config.dat"; +const char * config_filename = ("/"+ package_symbol_name + "_config.dat").c_str(); #else const char * config_filename = "/config"; #endif @@ -138,6 +138,7 @@ void Config::load() customload(reader); lisp_free(root_obj); + fclose(file); } void Config::save () @@ -173,6 +174,7 @@ void Config::save () customsave(config); fprintf(config, ")\n"); + fclose(config); } } -- 2.11.0