Bugfix: redraw TiaOutputWidget on savesnap when executing in a script.

This commit is contained in:
Markus Uhr 2017-11-13 22:02:46 +01:00 committed by Stephen Anthony
parent 5b207618c8
commit ff4603d81f
4 changed files with 16 additions and 5 deletions

View File

@ -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);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -123,6 +123,8 @@ class DebuggerParser
StringList argStrings;
uInt32 argCount;
uInt32 execDepth;
StringList myWatches;
// Keep track of traps (read and/or write)

View File

@ -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);
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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