FIXED: Load most recent save game did not work
FIXED: Save to oldest save game always wrote to slot 1 git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@272 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
b3232819b0
commit
de1172a65b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue