From 0d5ae3acf52fa840fd866e6ae5727f5f91255ab6 Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 19 Nov 2014 00:03:11 +0000 Subject: [PATCH] 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 --- Changes.txt | 5 +++++ docs/index.html | 8 +++++++- src/emucore/EventHandler.cxx | 13 +++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Changes.txt b/Changes.txt index 737a4b89c..76f964139 100644 --- a/Changes.txt +++ b/Changes.txt @@ -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! diff --git a/docs/index.html b/docs/index.html index 04c52d109..0caf10af2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1563,10 +1563,16 @@ - Save continuous PNG snapshots + Save continuous PNG snapshots (per interval) Alt + s Cmd + s + + + Save continuous PNG snapshots (every frame) + Shift-Alt + s + Shift-Cmd + s +

UI keys in Text Editing areas (cannot be remapped)

diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 23f6fc8ba..f3e78d45b 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -433,7 +433,16 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state) { ostringstream buf; uInt32 interval = myOSystem.settings().getInt("ssinterval"); - buf << "Enabling shotshots in " << interval << " second intervals"; + 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; }