mirror of https://github.com/stella-emu/stella.git
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:
parent
5099e2d9fc
commit
9b6ed83d7e
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue