Set timestamp for savegames on POSIX

So they can be sorted correctly etc
This commit is contained in:
Daniel Gibson 2012-12-29 05:23:58 +01:00
parent 1e3bc3429b
commit edb4856abd

View file

@ -478,42 +478,10 @@ int idSaveGameThread::Enumerate()
}
}
// RB: FIXME ?
// use current time
time_t aclock;
time( &aclock );
/*
// Use the date from the directory
WIN32_FILE_ATTRIBUTE_DATA attrData;
BOOL attrRet = GetFileAttributesEx( file->GetFullPath(), GetFileExInfoStandard, &attrData );
delete file;
if( attrRet == TRUE )
{
FILETIME lastWriteTime = attrData.ftLastWriteTime;
const ULONGLONG second = 10000000L; // One second = 10,000,000 * 100 nsec
SYSTEMTIME base_st = { 1970, 1, 0, 1, 0, 0, 0, 0 };
ULARGE_INTEGER itime;
FILETIME base_ft;
BOOL success = SystemTimeToFileTime( &base_st, &base_ft );
itime.QuadPart = ( ( ULARGE_INTEGER* )&lastWriteTime )->QuadPart;
if( success )
{
itime.QuadPart -= ( ( ULARGE_INTEGER* )&base_ft )->QuadPart;
}
else
{
// Hard coded number of 100-nanosecond units from 1/1/1601 to 1/1/1970
itime.QuadPart -= 116444736000000000LL;
}
itime.QuadPart /= second;
details->date = itime.QuadPart;
}
*/
// RB end
// DG: just use the idFile object's timestamp - the windows code gets file attributes and
// other complicated stuff like that.. I'm wonderin what that was good for.. this seems to work.
details->date = file->Timestamp();
// DG end
}
else
{