Added ability to save continuous snapshots per frame to Shift-Alt-s.

Eventually this may lead to proper movie output.  Thanks to SvOlli
for the code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3087 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-11-19 00:03:11 +00:00
parent 30c171325d
commit 0d5ae3acf5
3 changed files with 23 additions and 3 deletions

View File

@ -26,6 +26,11 @@
* The debugger 'reset' command now does a complete system reset,
instead of simply setting the PC to the reset vector address.
* Added 'Shift-Alt/Shift-Cmd s' keyboard shortcut, to enable continuous
snapshot mode for each frame. This is really only useful if you
save snapshots in 1x mode; using it in high-resolution mode is
not recommended. Special thanks to SvOlli for the idea and code.
* Updated included PNG library to latest stable version.
-Have fun!

View File

@ -1563,10 +1563,16 @@
</tr>
<tr>
<td>Save continuous PNG snapshots</td>
<td>Save continuous PNG snapshots (per interval)</td>
<td>Alt + s</td>
<td>Cmd + s</td>
</tr>
<tr>
<td>Save continuous PNG snapshots (every frame)</td>
<td>Shift-Alt + s</td>
<td>Shift-Cmd + s</td>
</tr>
</table>
<p><b>UI keys in Text Editing areas (cannot be remapped)</b></p>

View File

@ -433,7 +433,16 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
{
ostringstream buf;
uInt32 interval = myOSystem.settings().getInt("ssinterval");
if(mod & KBDM_SHIFT)
{
buf << "Enabling shotshots every frame";
interval = 1;
}
else
{
buf << "Enabling shotshots in " << interval << " second intervals";
interval *= (uInt32) myOSystem.frameRate();
}
myOSystem.frameBuffer().showMessage(buf.str());
setContinuousSnapshots(interval);
}
@ -1825,7 +1834,7 @@ void EventHandler::setMouseControllerMode(const string& enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::setContinuousSnapshots(uInt32 interval)
{
myContSnapshotInterval = (uInt32) myOSystem.frameRate() * interval;
myContSnapshotInterval = interval;
myContSnapshotCounter = 0;
}