Snapshots in continuous snapshot mode are now tagged with a timestamp,

so they don't overwrite previously created files.  This timestamp is
related to the millisecond that the snapshot was taken, so there's no
chance of overlap (snapshots can only be taken every 1 second / 1000
milliseconds at most).  The appended value is an 8-character hex
representation of this 32-bit value.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2055 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-06-16 13:45:32 +00:00
parent 5099e2d9fc
commit 9b6ed83d7e
1 changed files with 3 additions and 3 deletions

View File

@ -766,14 +766,14 @@ void EventHandler::poll(uInt64 time)
{
#ifdef CHEATCODE_SUPPORT
const CheatList& cheats = myOSystem->cheat().perFrame();
for(unsigned int i = 0; i < cheats.size(); i++)
for(uInt32 i = 0; i < cheats.size(); i++)
cheats[i]->evaluate();
#endif
// Handle continuous snapshots
if(myContSnapshotInterval > 0 &&
(++myContSnapshotCounter % myContSnapshotInterval == 0))
takeSnapshot(myContSnapshotCounter / myContSnapshotInterval);
takeSnapshot(time >> 10); // not quite milliseconds, but close enough
}
}
else if(myOverlay)
@ -1838,7 +1838,7 @@ void EventHandler::takeSnapshot(uInt32 number)
if(number > 0)
{
ostringstream buf;
buf << sspath << "_" << number << ".png";
buf << sspath << "_" << hex << setw(8) << setfill('0') << number << ".png";
filename = buf.str();
}
else if(!myOSystem->settings().getBool("sssingle"))