mirror of https://github.com/stella-emu/stella.git
parent
d7eba0b54c
commit
f3dd2cd884
|
@ -125,11 +125,6 @@ class Debugger : public DialogContainer
|
|||
*/
|
||||
void getCompletions(string_view in, StringList& list) const;
|
||||
|
||||
/**
|
||||
The dialog/GUI associated with the debugger
|
||||
*/
|
||||
Dialog& dialog() const { return *myDialog; }
|
||||
|
||||
/**
|
||||
The debugger subsystem responsible for all CPU state
|
||||
*/
|
||||
|
|
|
@ -123,7 +123,7 @@ void CartridgeELFStateWidget::initialize()
|
|||
|
||||
y += myQueueSize->getHeight() + lineHeight / 2;
|
||||
|
||||
myNextTransaction = new StaticTextWidget(_boss, _font, x0, y, describeTransaction(0xffff, 0xffff, ~0LL));
|
||||
myNextTransaction = new StaticTextWidget(_boss, _font, x0, y, describeTransaction(0xffff, 0xffff, ~0LLu));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -25,12 +25,9 @@
|
|||
#include "BrowserDialog.hxx"
|
||||
#include "OSystem.hxx"
|
||||
#include "FrameBuffer.hxx"
|
||||
#include "Debugger.hxx"
|
||||
#include "bspf.hxx"
|
||||
|
||||
namespace {
|
||||
constexpr int SAVE_ARM_IMAGE_CMD = 'sarm';
|
||||
} // namespace
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CartridgeELFWidget::CartridgeELFWidget(GuiObject* boss,
|
||||
const GUI::Font& lfont, const GUI::Font& nfont,
|
||||
|
@ -74,7 +71,7 @@ void CartridgeELFWidget::initialize()
|
|||
|
||||
WidgetArray wid;
|
||||
|
||||
auto* saveImageButton = new ButtonWidget(_boss, _font, x, y, "Save ARM image" + ELLIPSIS, SAVE_ARM_IMAGE_CMD);
|
||||
auto* saveImageButton = new ButtonWidget(_boss, _font, x, y, "Save ARM image" + ELLIPSIS, kSaveArmImageCmd);
|
||||
saveImageButton->setTarget(this);
|
||||
|
||||
wid.push_back(saveImageButton);
|
||||
|
@ -91,19 +88,19 @@ void CartridgeELFWidget::saveArmImage(const FSNode& node)
|
|||
const size_t sizeWritten = node.write(buffer, size);
|
||||
if (sizeWritten != size) throw runtime_error("failed to write arm image");
|
||||
|
||||
instance().frameBuffer().showTextMessage("Successfully exported ARM executable image", MessagePosition::MiddleCenter, true);
|
||||
instance().frameBuffer().showTextMessage("Successfully exported ARM executable image", MessagePosition::BottomCenter, true);
|
||||
}
|
||||
catch (...) {
|
||||
instance().frameBuffer().showTextMessage("Failed to export ARM executable image", MessagePosition::MiddleCenter, true);
|
||||
instance().frameBuffer().showTextMessage("Failed to export ARM executable image", MessagePosition::BottomCenter, true);
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeELFWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
if (cmd == SAVE_ARM_IMAGE_CMD)
|
||||
if (cmd == kSaveArmImageCmd)
|
||||
BrowserDialog::show(
|
||||
_boss,
|
||||
instance().debugger().baseDialog(),
|
||||
"Save ARM image",
|
||||
instance().userDir().getPath() + "arm_image.bin",
|
||||
BrowserDialog::Mode::FileSave,
|
||||
|
|
|
@ -119,7 +119,7 @@ void BrowserDialog::show(GuiObject* parent, const GUI::Font& font,
|
|||
{
|
||||
uInt32 w = 0, h = 0;
|
||||
|
||||
const auto* parentDialog = dynamic_cast<Dialog*>(parent);
|
||||
const auto* parentDialog = static_cast<Dialog*>(parent);
|
||||
if (parentDialog) {
|
||||
parentDialog->getDynamicBounds(w, h);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue