From 9ada07a7330f8cb64c1842c337a7adeb946b9334 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Fri, 24 Nov 2017 13:24:19 -0330 Subject: [PATCH] Minor fixups for last commits. --- src/debugger/DebuggerParser.cxx | 4 ++-- src/debugger/gui/TiaOutputWidget.cxx | 4 ++-- src/debugger/gui/TiaOutputWidget.hxx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index c7e567acd..4068d12ad 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -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++; diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 9664b3f01..ddbf48d29 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -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); diff --git a/src/debugger/gui/TiaOutputWidget.hxx b/src/debugger/gui/TiaOutputWidget.hxx index 59a3c1843..b62fc123e 100644 --- a/src/debugger/gui/TiaOutputWidget.hxx +++ b/src/debugger/gui/TiaOutputWidget.hxx @@ -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