[Scummvm-cvs-logs] SF.net SVN: scummvm:[33918] scummvm/branches/gsoc2008-rtl
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Fri Aug 15 23:25:25 CEST 2008
Revision: 33918
http://scummvm.svn.sourceforge.net/scummvm/?rev=33918&view=rev
Author: cpage88
Date: 2008-08-15 21:25:24 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
If the last savegame is deleted, reset save_slot in config man to -1
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp
scummvm/branches/gsoc2008-rtl/gui/launcher.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp 2008-08-15 21:01:32 UTC (rev 33917)
+++ scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp 2008-08-15 21:25:24 UTC (rev 33918)
@@ -696,7 +696,7 @@
int saveSlot = ConfMan.getInt("save_slot");
// Savegames are numbered starting from 1 in the dialog window,
// but their filenames are numbered starting from 0.
- if (saveSlot >= 0 && _control->savegamesExist() &&_control->restoreGameFromFile(saveSlot)) {
+ if (saveSlot >= 0 && _control->savegamesExist() && _control->restoreGameFromFile(saveSlot)) {
_control->doRestore();
} else if (_control->savegamesExist()) {
_systemVars.controlPanelMode = CP_NEWGAME;
Modified: scummvm/branches/gsoc2008-rtl/gui/launcher.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/gui/launcher.cpp 2008-08-15 21:01:32 UTC (rev 33917)
+++ scummvm/branches/gsoc2008-rtl/gui/launcher.cpp 2008-08-15 21:25:24 UTC (rev 33918)
@@ -969,6 +969,8 @@
String filename = saveList[idx].filename();
printf("Deleting file: %s\n", filename.c_str());
saveFileMan->removeSavefile(filename.c_str());
+ if ((saveList.size() - 1) == 0)
+ ConfMan.setInt("save_slot", -1);
}
// Load the savegame
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list