clean up screenshot saving

use a unique name for every screenshot in case image files are moved off the memory card
This commit is contained in:
Chris Danford
2004-02-22 05:04:11 +00:00
parent 97e9277d1c
commit 721f29c458
6 changed files with 39 additions and 27 deletions
+2 -6
View File
@@ -1253,12 +1253,8 @@ void Profile::LoadScreenshotDataFromNode( const XNode* pNode )
if( !(*screenshot)->GetChildValue("MD5",ss.sMD5) )
WARN_AND_CONTINUE;
XNode *pHighScoreNode = (*screenshot)->GetChild("HighScore");
if( pHighScoreNode == NULL )
if( !(*screenshot)->GetChildValue("Time",(int&)ss.time) ) // time_t is a signed long on Win32. Is this ok on other platforms?
WARN_AND_CONTINUE;
HighScore &hs = ss.highScore;
hs.LoadFromNode( pHighScoreNode );
m_vScreenshots.push_back( ss );
}
@@ -1282,7 +1278,7 @@ XNode* Profile::SaveScreenshotDataCreateNode() const
pScreenshotNode->AppendChild( "FileName", ss.sFileName );
pScreenshotNode->AppendChild( "MD5", ss.sMD5);
pScreenshotNode->AppendChild( ss.highScore.CreateNode() );
pScreenshotNode->AppendChild( "Time", ss.time);
}
return pNode;