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)
|
DebuggerParser::DebuggerParser(Debugger& d, Settings& s)
|
||||||
: debugger(d),
|
: debugger(d),
|
||||||
settings(s),
|
settings(s),
|
||||||
argCount(0)
|
argCount(0),
|
||||||
|
execDepth(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1064,7 +1065,9 @@ void DebuggerParser::executeExec()
|
||||||
file += ".script";
|
file += ".script";
|
||||||
|
|
||||||
FilesystemNode node(debugger.myOSystem.defaultSaveDir() + file);
|
FilesystemNode node(debugger.myOSystem.defaultSaveDir() + file);
|
||||||
|
execDepth++;
|
||||||
commandResult << exec(node);
|
commandResult << exec(node);
|
||||||
|
execDepth--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -1695,7 +1698,7 @@ void DebuggerParser::executeSaveses()
|
||||||
// "savesnap"
|
// "savesnap"
|
||||||
void DebuggerParser::executeSavesnap()
|
void DebuggerParser::executeSavesnap()
|
||||||
{
|
{
|
||||||
debugger.tiaOutput().saveSnapshot();
|
debugger.tiaOutput().saveSnapshot(execDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -123,6 +123,8 @@ class DebuggerParser
|
||||||
StringList argStrings;
|
StringList argStrings;
|
||||||
uInt32 argCount;
|
uInt32 argCount;
|
||||||
|
|
||||||
|
uInt32 execDepth;
|
||||||
|
|
||||||
StringList myWatches;
|
StringList myWatches;
|
||||||
|
|
||||||
// Keep track of traps (read and/or write)
|
// 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);
|
int number = int(instance().getTicks() / 1000);
|
||||||
ostringstream sspath;
|
ostringstream sspath;
|
||||||
sspath << instance().snapshotSaveDir()
|
sspath << instance().snapshotSaveDir()
|
||||||
|
@ -80,8 +83,10 @@ void TiaOutputWidget::saveSnapshot()
|
||||||
{
|
{
|
||||||
message = e.what();
|
message = e.what();
|
||||||
}
|
}
|
||||||
|
if (execDepth == 0) {
|
||||||
instance().frameBuffer().showMessage(message);
|
instance().frameBuffer().showMessage(message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TiaOutputWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
void TiaOutputWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
||||||
|
|
|
@ -36,7 +36,8 @@ class TiaOutputWidget : public Widget, public CommandSender
|
||||||
void loadConfig() override;
|
void loadConfig() override;
|
||||||
void setZoomWidget(TiaZoomWidget* w) { myZoom = w; }
|
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
|
// Eventually, these methods will enable access to the onscreen TIA image
|
||||||
// For example, clicking an area may cause an action
|
// For example, clicking an area may cause an action
|
||||||
|
|
Loading…
Reference in New Issue