mirror of https://github.com/stella-emu/stella.git
Bugfix: redraw TiaOutputWidget on savesnap when executing in a script.
This commit is contained in:
parent
5b207618c8
commit
ff4603d81f
|
@ -58,7 +58,8 @@ using std::right;
|
|||
DebuggerParser::DebuggerParser(Debugger& d, Settings& s)
|
||||
: debugger(d),
|
||||
settings(s),
|
||||
argCount(0)
|
||||
argCount(0),
|
||||
execDepth(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1064,7 +1065,9 @@ void DebuggerParser::executeExec()
|
|||
file += ".script";
|
||||
|
||||
FilesystemNode node(debugger.myOSystem.defaultSaveDir() + file);
|
||||
execDepth++;
|
||||
commandResult << exec(node);
|
||||
execDepth--;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -1695,7 +1698,7 @@ void DebuggerParser::executeSaveses()
|
|||
// "savesnap"
|
||||
void DebuggerParser::executeSavesnap()
|
||||
{
|
||||
debugger.tiaOutput().saveSnapshot();
|
||||
debugger.tiaOutput().saveSnapshot(execDepth);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -123,6 +123,8 @@ class DebuggerParser
|
|||
StringList argStrings;
|
||||
uInt32 argCount;
|
||||
|
||||
uInt32 execDepth;
|
||||
|
||||
StringList myWatches;
|
||||
|
||||
// Keep track of traps (read and/or write)
|
||||
|
|
|
@ -58,8 +58,11 @@ void TiaOutputWidget::loadConfig()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TiaOutputWidget::saveSnapshot()
|
||||
void TiaOutputWidget::saveSnapshot(int execDepth)
|
||||
{
|
||||
if (execDepth > 0) {
|
||||
drawWidget(false);
|
||||
}
|
||||
int number = int(instance().getTicks() / 1000);
|
||||
ostringstream sspath;
|
||||
sspath << instance().snapshotSaveDir()
|
||||
|
@ -80,7 +83,9 @@ void TiaOutputWidget::saveSnapshot()
|
|||
{
|
||||
message = e.what();
|
||||
}
|
||||
instance().frameBuffer().showMessage(message);
|
||||
if (execDepth == 0) {
|
||||
instance().frameBuffer().showMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -36,7 +36,8 @@ class TiaOutputWidget : public Widget, public CommandSender
|
|||
void loadConfig() override;
|
||||
void setZoomWidget(TiaZoomWidget* w) { myZoom = w; }
|
||||
|
||||
void saveSnapshot();
|
||||
void saveSnapshot() { saveSnapshot(0); };
|
||||
void saveSnapshot(int execDepth);
|
||||
|
||||
// Eventually, these methods will enable access to the onscreen TIA image
|
||||
// For example, clicking an area may cause an action
|
||||
|
|
Loading…
Reference in New Issue