aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2003-08-24 14:13:12 +0000
committerJonathan Gray2003-08-24 14:13:12 +0000
commit011d7b897d96029470cf85fe3dafc569185751b2 (patch)
treecd7ffe246689e102be03a125dc116fd456dbc459
parent527fa147c58e352ab1f8b2f6c801d5bbee234fbd (diff)
downloadscummvm-rg350-011d7b897d96029470cf85fe3dafc569185751b2.tar.gz
scummvm-rg350-011d7b897d96029470cf85fe3dafc569185751b2.tar.bz2
scummvm-rg350-011d7b897d96029470cf85fe3dafc569185751b2.zip
use less generic file name for settings.dat, I assume filenames > 8.3 are ok for everyone?
svn-id: r9849
-rw-r--r--sword2/controls.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/sword2/controls.cpp b/sword2/controls.cpp
index 622cbf4202..3c0233a7aa 100644
--- a/sword2/controls.cpp
+++ b/sword2/controls.cpp
@@ -1892,10 +1892,13 @@ int32 ReadOptionSettings(void) //pete10Jun97
// byte 8 = subtitle state and byte 9 = object label state.
uint8 buff[10];
+ char filename[256];
SaveFile *fp;
SaveFileManager *mgr = g_system->get_savefile_manager();
- if (!(fp = mgr->open_savefile("Settings.dat", g_sword2->getSavePath(), false)))
+ sprintf(filename, "%s-settings.dat", g_sword2->_game_name);
+
+ if (!(fp = mgr->open_savefile(filename, g_sword2->getSavePath(), false)))
return (1);
if (fp->read(buff, 10) != 10)
@@ -1933,9 +1936,11 @@ int32 ReadOptionSettings(void) //pete10Jun97
int32 WriteOptionSettings(void) //pete10Jun97
{
uint8 buff[10];
+ char filename[256];
SaveFile *fp;
SaveFileManager *mgr = g_system->get_savefile_manager();
+ sprintf(filename, "%s-settings.dat", g_sword2->_game_name);
buff[0] = g_sword2->_sound->GetMusicVolume();
buff[1] = g_sword2->_sound->GetSpeechVolume();
@@ -1948,7 +1953,7 @@ int32 WriteOptionSettings(void) //pete10Jun97
buff[8] = pointerTextSelected;
buff[9] = stereoReversed;
- if (!(fp = mgr->open_savefile("Settings.dat", g_sword2->getSavePath(), true)))
+ if (!(fp = mgr->open_savefile(filename, g_sword2->getSavePath(), true)))
return (1);
if (fp->write(buff, 10) != 10)