[Scummvm-cvs-logs] SF.net SVN: scummvm:[35988] scummvm/branches/branch-0-13-0/engines/sword1/ control.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Jan 21 21:10:22 CET 2009
Revision: 35988
http://scummvm.svn.sourceforge.net/scummvm/?rev=35988&view=rev
Author: eriktorbjorn
Date: 2009-01-21 20:10:22 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Backported save/load dialog fixes from trunk.
Modified Paths:
--------------
scummvm/branches/branch-0-13-0/engines/sword1/control.cpp
Modified: scummvm/branches/branch-0-13-0/engines/sword1/control.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/sword1/control.cpp 2009-01-21 20:00:26 UTC (rev 35987)
+++ scummvm/branches/branch-0-13-0/engines/sword1/control.cpp 2009-01-21 20:10:22 UTC (rev 35988)
@@ -697,7 +697,7 @@
uint8 len = _saveNames[_selectedSavegame].size();
if ((kbd.keycode == Common::KEYCODE_BACKSPACE) && len) // backspace
_saveNames[_selectedSavegame].deleteLastChar();
- else if (keyAccepted(kbd.ascii) && (len < 31)) {
+ else if (kbd.ascii && keyAccepted(kbd.ascii) && (len < 31)) {
_saveNames[_selectedSavegame].insertChar(kbd.ascii, len);
}
showSavegameNames();
@@ -724,6 +724,8 @@
Common::StringList filenames = _saveFileMan->listSavefiles(pattern.c_str());
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+ _saveNames.clear();
+
int num = 0;
int slotNum = 0;
for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
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