mirror of https://github.com/stella-emu/stella.git
Some improvements to continuous snapshot mode:
1) the interval between snapshots can be configured within the 'File Settings' dialog 2) the commandline option is now named 'ssinterval' instead of 'ssdelay' 3) the action is tied to the 'Alt/Cmd-s' key instead of a function key There's just one more small issue to take care of in the Windows port, and the next release should be ready. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2011 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
7806f1205a
commit
f94ebed340
|
@ -134,10 +134,9 @@
|
||||||
Critical messages are still shown, though.
|
Critical messages are still shown, though.
|
||||||
|
|
||||||
* Added ability to take multiple snapshots in a given interval every
|
* Added ability to take multiple snapshots in a given interval every
|
||||||
x seconds. This is currently tied to the 'Shift-F12' key and is not
|
x seconds. This is currently tied to the 'Alt-s' key and is not
|
||||||
remappable (for now). The interval can be set with the 'ssdelay'
|
remappable (for now). The interval can be set with the 'ssinterval'
|
||||||
commandline argument, and defaults to 2. Currently, this can't be
|
commandline argument and within the UI, and defaults to 2.
|
||||||
changed from within the UI.
|
|
||||||
|
|
||||||
* Many changes to the FrameBuffer and UI code for 'smaller' systems.
|
* Many changes to the FrameBuffer and UI code for 'smaller' systems.
|
||||||
Stella will now scale correctly to small screens, down to 320x240
|
Stella will now scale correctly to small screens, down to 320x240
|
||||||
|
|
|
@ -919,8 +919,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-ssdelay <delay></pre></td>
|
<td><pre>-ssinterval <number></pre></td>
|
||||||
<td>Set the delay in seconds between taking snapshots in continuous snapshot mode (currently, 1 - 10).</td>
|
<td>Set the interval in seconds between taking snapshots in continuous snapshot mode (currently, 1 - 10).</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -2225,8 +2225,8 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Save continuous PNG snapshots</td>
|
<td>Save continuous PNG snapshots</td>
|
||||||
<td>Shift-F12</td>
|
<td>Alt + s</td>
|
||||||
<td>Shift-F12</td>
|
<td>Cmd + s</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -451,14 +451,14 @@ void EventHandler::poll(uInt64 time)
|
||||||
myOSystem->frameBuffer().toggleFrameStats();
|
myOSystem->frameBuffer().toggleFrameStats();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDLK_F12: // TODO - make this remappable
|
case SDLK_s: // TODO - make this remappable
|
||||||
if(myContSnapshotInterval == 0)
|
if(myContSnapshotInterval == 0)
|
||||||
{
|
{
|
||||||
ostringstream buf;
|
ostringstream buf;
|
||||||
uInt32 delay = myOSystem->settings().getInt("ssdelay");
|
uInt32 interval = myOSystem->settings().getInt("ssinterval");
|
||||||
buf << "Enabling shotshots in " << delay << " second intervals";
|
buf << "Enabling shotshots in " << interval << " second intervals";
|
||||||
myOSystem->frameBuffer().showMessage(buf.str());
|
myOSystem->frameBuffer().showMessage(buf.str());
|
||||||
setContinuousSnapshots(delay);
|
setContinuousSnapshots(interval);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,7 +92,7 @@ Settings::Settings(OSystem* osystem)
|
||||||
setInternal("ssdir", "");
|
setInternal("ssdir", "");
|
||||||
setInternal("sssingle", "false");
|
setInternal("sssingle", "false");
|
||||||
setInternal("ss1x", "false");
|
setInternal("ss1x", "false");
|
||||||
setInternal("ssdelay", "2");
|
setInternal("ssinterval", "2");
|
||||||
|
|
||||||
// Config files and paths
|
// Config files and paths
|
||||||
setInternal("romdir", "~");
|
setInternal("romdir", "~");
|
||||||
|
@ -270,9 +270,9 @@ void Settings::validate()
|
||||||
if(i < 1) setInternal("pspeed", "1");
|
if(i < 1) setInternal("pspeed", "1");
|
||||||
else if(i > 15) setInternal("pspeed", "15");
|
else if(i > 15) setInternal("pspeed", "15");
|
||||||
|
|
||||||
i = getInt("ssdelay");
|
i = getInt("ssinterval");
|
||||||
if(i < 1) setInternal("ssdelay", "2");
|
if(i < 1) setInternal("ssinterval", "2");
|
||||||
else if(i > 10) setInternal("ssdelay", "10");
|
else if(i > 10) setInternal("ssinterval", "10");
|
||||||
|
|
||||||
s = getString("palette");
|
s = getString("palette");
|
||||||
if(s != "standard" && s != "z26" && s != "user")
|
if(s != "standard" && s != "z26" && s != "user")
|
||||||
|
@ -378,7 +378,7 @@ void Settings::usage()
|
||||||
<< " -ssdir <path> The directory to save snapshot files to\n"
|
<< " -ssdir <path> The directory to save snapshot files to\n"
|
||||||
<< " -sssingle <1|0> Generate single snapshot instead of many\n"
|
<< " -sssingle <1|0> Generate single snapshot instead of many\n"
|
||||||
<< " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling/effects)\n"
|
<< " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling/effects)\n"
|
||||||
<< " -ssdelay <delay> Number of seconds between snapshots in continuous snapshot mode\n"
|
<< " -ssinterval <number Number of seconds between snapshots in continuous snapshot mode\n"
|
||||||
<< endl
|
<< endl
|
||||||
<< " -rominfo <rom> Display detailed information for the given ROM\n"
|
<< " -rominfo <rom> Display detailed information for the given ROM\n"
|
||||||
<< " -listrominfo Display contents of stella.pro, one line per ROM entry\n"
|
<< " -listrominfo Display contents of stella.pro, one line per ROM entry\n"
|
||||||
|
|
|
@ -51,7 +51,7 @@ FileSnapDialog::FileSnapDialog(
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
_w = 52 * fontWidth + 8;
|
_w = 52 * fontWidth + 8;
|
||||||
_h = 11 * (lineHeight + 4) + 10;
|
_h = 12 * (lineHeight + 4) + 10;
|
||||||
|
|
||||||
xpos = vBorder; ypos = vBorder;
|
xpos = vBorder; ypos = vBorder;
|
||||||
|
|
||||||
|
@ -137,6 +137,20 @@ FileSnapDialog::FileSnapDialog(
|
||||||
"Snapshot in 1x mode");
|
"Snapshot in 1x mode");
|
||||||
wid.push_back(mySnap1x);
|
wid.push_back(mySnap1x);
|
||||||
|
|
||||||
|
// Snapshot interval (continuous mode)
|
||||||
|
xpos = 30; ypos += b->getHeight();
|
||||||
|
mySnapSlider =
|
||||||
|
new SliderWidget(this, font, xpos, ypos, 6*fontWidth, lineHeight,
|
||||||
|
"Snapshot interval: ", font.getStringWidth("Snapshot interval: "),
|
||||||
|
kSnapIntervalChanged);
|
||||||
|
mySnapSlider->setMinValue(1); mySnapSlider->setMaxValue(10);
|
||||||
|
wid.push_back(mySnapSlider);
|
||||||
|
mySnapLabel =
|
||||||
|
new StaticTextWidget(this, font, xpos + mySnapSlider->getWidth() + 4,
|
||||||
|
ypos + 1, 3*fontWidth, font.getFontHeight(), "",
|
||||||
|
kTextAlignLeft);
|
||||||
|
mySnapLabel->setFlags(WIDGET_CLEARBG);
|
||||||
|
|
||||||
// Add Defaults, OK and Cancel buttons
|
// Add Defaults, OK and Cancel buttons
|
||||||
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
b = new ButtonWidget(this, font, 10, _h - buttonHeight - 10,
|
||||||
font.getStringWidth("Defaults") + 20, buttonHeight,
|
font.getStringWidth("Defaults") + 20, buttonHeight,
|
||||||
|
@ -176,6 +190,8 @@ void FileSnapDialog::loadConfig()
|
||||||
myEEPROMPath->setEditString(settings.getString("eepromdir"));
|
myEEPROMPath->setEditString(settings.getString("eepromdir"));
|
||||||
mySnapSingle->setState(!settings.getBool("sssingle"));
|
mySnapSingle->setState(!settings.getBool("sssingle"));
|
||||||
mySnap1x->setState(settings.getBool("ss1x"));
|
mySnap1x->setState(settings.getBool("ss1x"));
|
||||||
|
mySnapSlider->setValue(instance().settings().getInt("ssinterval"));
|
||||||
|
mySnapLabel->setLabel(instance().settings().getString("ssinterval"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -190,6 +206,7 @@ void FileSnapDialog::saveConfig()
|
||||||
instance().settings().setString("eepromdir", myEEPROMPath->getEditString());
|
instance().settings().setString("eepromdir", myEEPROMPath->getEditString());
|
||||||
instance().settings().setBool("sssingle", !mySnapSingle->getState());
|
instance().settings().setBool("sssingle", !mySnapSingle->getState());
|
||||||
instance().settings().setBool("ss1x", mySnap1x->getState());
|
instance().settings().setBool("ss1x", mySnap1x->getState());
|
||||||
|
instance().settings().setInt("ssinterval", mySnapSlider->getValue());
|
||||||
|
|
||||||
// Flush changes to disk and inform the OSystem
|
// Flush changes to disk and inform the OSystem
|
||||||
instance().settings().saveConfig();
|
instance().settings().saveConfig();
|
||||||
|
@ -233,6 +250,8 @@ void FileSnapDialog::setDefaults()
|
||||||
|
|
||||||
mySnapSingle->setState(true);
|
mySnapSingle->setState(true);
|
||||||
mySnap1x->setState(false);
|
mySnap1x->setState(false);
|
||||||
|
mySnapSlider->setValue(2);
|
||||||
|
mySnapLabel->setLabel("2");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -340,6 +359,10 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
sendCommand(kReloadRomDirCmd, 0, 0);
|
sendCommand(kReloadRomDirCmd, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kSnapIntervalChanged:
|
||||||
|
mySnapLabel->setValue(mySnapSlider->getValue());
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Dialog::handleCommand(sender, cmd, data, 0);
|
Dialog::handleCommand(sender, cmd, data, 0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -30,6 +30,8 @@ class BrowserDialog;
|
||||||
class CheckboxWidget;
|
class CheckboxWidget;
|
||||||
class PopUpWidget;
|
class PopUpWidget;
|
||||||
class EditTextWidget;
|
class EditTextWidget;
|
||||||
|
class SliderWidget;
|
||||||
|
class StaticTextWidget;
|
||||||
|
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "Command.hxx"
|
#include "Command.hxx"
|
||||||
|
@ -63,7 +65,8 @@ class FileSnapDialog : public Dialog, public CommandSender
|
||||||
kCheatFileChosenCmd = 'LOcc', // cheatfile changed
|
kCheatFileChosenCmd = 'LOcc', // cheatfile changed
|
||||||
kPaletteFileChosenCmd = 'LOpc', // palette file changed
|
kPaletteFileChosenCmd = 'LOpc', // palette file changed
|
||||||
kPropsFileChosenCmd = 'LOrc', // properties file changed
|
kPropsFileChosenCmd = 'LOrc', // properties file changed
|
||||||
kEEPROMDirChosenCmd = 'LOec' // eeprom dir changed
|
kEEPROMDirChosenCmd = 'LOec', // eeprom dir changed
|
||||||
|
kSnapIntervalChanged = 'LOsi' // continuous snapshot interval
|
||||||
};
|
};
|
||||||
|
|
||||||
BrowserDialog* myBrowser;
|
BrowserDialog* myBrowser;
|
||||||
|
@ -76,8 +79,12 @@ class FileSnapDialog : public Dialog, public CommandSender
|
||||||
EditTextWidget* myPaletteFile;
|
EditTextWidget* myPaletteFile;
|
||||||
EditTextWidget* myPropsFile;
|
EditTextWidget* myPropsFile;
|
||||||
EditTextWidget* mySnapPath;
|
EditTextWidget* mySnapPath;
|
||||||
CheckboxWidget* mySnapSingle;
|
|
||||||
CheckboxWidget* mySnap1x;
|
// Other snapshot settings
|
||||||
|
CheckboxWidget* mySnapSingle;
|
||||||
|
CheckboxWidget* mySnap1x;
|
||||||
|
SliderWidget* mySnapSlider;
|
||||||
|
StaticTextWidget* mySnapLabel;
|
||||||
|
|
||||||
// Indicates if this dialog is used for global (vs. in-game) settings
|
// Indicates if this dialog is used for global (vs. in-game) settings
|
||||||
bool myIsGlobal;
|
bool myIsGlobal;
|
||||||
|
|
Loading…
Reference in New Issue