Minor fixups for last commits.

This commit is contained in:
Stephen Anthony 2017-11-24 13:24:19 -03:30
parent bfd12d7ddc
commit 9ada07a733
3 changed files with 5 additions and 6 deletions

View File

@ -1061,7 +1061,7 @@ void DebuggerParser::executeDump()
file << execPrefix;
}
else {
file << std::hex << std::setw(8) << std::setfill('0') << (debugger.myOSystem.getTicks()/1000 & 0xffffffff);
file << std::hex << std::setw(8) << std::setfill('0') << uInt32(debugger.myOSystem.getTicks()/1000);
}
file << ".dump";
FilesystemNode node(file.str());
@ -1140,7 +1140,7 @@ void DebuggerParser::executeExec()
}
else {
ostringstream prefix;
prefix << std::hex << std::setw(8) << std::setfill('0') << (debugger.myOSystem.getTicks()/1000 & 0xffffffff);
prefix << std::hex << std::setw(8) << std::setfill('0') << uInt32(debugger.myOSystem.getTicks()/1000);
execPrefix = prefix.str();
}
execDepth++;

View File

@ -70,14 +70,14 @@ void TiaOutputWidget::saveSnapshot(int execDepth, const string& execPrefix)
if (execDepth > 0 && !execPrefix.empty()) {
sspath << execPrefix << "_";
}
sspath << std::hex << std::setw(8) << std::setfill('0') << (instance().getTicks()/1000 & 0xffffffff) << ".png";
sspath << std::hex << std::setw(8) << std::setfill('0') << uInt32(instance().getTicks()/1000) << ".png";
const uInt32 width = instance().console().tia().width(),
height = instance().console().tia().height();
FBSurface& s = dialog().surface();
GUI::Rect rect(_x, _y, _x + width*2, _y + height);
string message = "snapshot saved";
string message = "Snapshot saved";
try
{
instance().png().saveImage(sspath.str(), s, rect);

View File

@ -36,8 +36,7 @@ class TiaOutputWidget : public Widget, public CommandSender
void loadConfig() override;
void setZoomWidget(TiaZoomWidget* w) { myZoom = w; }
void saveSnapshot() { saveSnapshot(0, ""); };
void saveSnapshot(int execDepth, const string& execPrefix);
void saveSnapshot(int execDepth = 0, const string& execPrefix = "");
// Eventually, these methods will enable access to the onscreen TIA image
// For example, clicking an area may cause an action