FIXED: Load most recent save game did not work

FIXED: Save to oldest save game always wrote to slot 1
This commit is contained in:
spacy51 2008-01-08 16:03:52 +00:00
parent e250495c0d
commit 5486744685
1 changed files with 3 additions and 3 deletions

View File

@ -816,14 +816,14 @@ void MainWnd::OnFileSavegameOldestslot()
CString name;
CFileStatus status;
CString str;
time_t time = (time_t)-1;
time_t time = 0;
int found = 0;
for(int i = 0; i < 10; i++) {
name.Format("%s%s%d.sgm", saveDir, filename, i+1);
if(emulating && CFile::GetStatus(name, status)) {
if(status.m_mtime.GetTime() < time) {
if( (status.m_mtime.GetTime() < time) || !time ) {
time = status.m_mtime.GetTime();
found = i;
}
@ -929,7 +929,7 @@ void MainWnd::OnFileLoadgameMostrecent()
name.Format("%s%s%d.sgm", saveDir, filename, i+1);
if(emulating && CFile::GetStatus(name, status)) {
if(status.m_mtime.GetTime() < time) {
if(status.m_mtime.GetTime() > time) {
time = status.m_mtime.GetTime();
found = i;
}