diff --git a/src/cheat/CheatCodeDialog.cxx b/src/cheat/CheatCodeDialog.cxx index f02be1de1..31ef207d1 100644 --- a/src/cheat/CheatCodeDialog.cxx +++ b/src/cheat/CheatCodeDialog.cxx @@ -35,7 +35,7 @@ #include "CheatCodeDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CheatCodeDialog::CheatCodeDialog(OSystem* osystem, DialogContainer* parent, +CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font) : Dialog(osystem, parent, 0, 0, 0, 0) { diff --git a/src/cheat/CheatCodeDialog.hxx b/src/cheat/CheatCodeDialog.hxx index 7cb96e57b..44f9d5153 100644 --- a/src/cheat/CheatCodeDialog.hxx +++ b/src/cheat/CheatCodeDialog.hxx @@ -36,7 +36,7 @@ class OSystem; class CheatCodeDialog : public Dialog { public: - CheatCodeDialog(OSystem* osystem, DialogContainer* parent, + CheatCodeDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); virtual ~CheatCodeDialog(); diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index f3972f55d..975b6a27c 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -111,7 +111,7 @@ static const char* pseudo_registers[][2] = { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Debugger::Debugger(OSystem& osystem, Console& console) - : DialogContainer(&osystem), + : DialogContainer(osystem), myConsole(console), mySystem(console.system()), myDialog(NULL), @@ -166,8 +166,8 @@ Debugger::~Debugger() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Debugger::initialize() { - const GUI::Size& s = myOSystem->settings().getSize("dbg.res"); - const GUI::Size& d = myOSystem->frameBuffer().desktopSize(); + const GUI::Size& s = myOSystem.settings().getSize("dbg.res"); + const GUI::Size& d = myOSystem.frameBuffer().desktopSize(); myWidth = s.w; myHeight = s.h; // The debugger dialog is resizable, within certain bounds @@ -177,13 +177,13 @@ void Debugger::initialize() myWidth = BSPF_min(myWidth, (uInt32)d.w); myHeight = BSPF_min(myHeight, (uInt32)d.h); - myOSystem->settings().setValue("dbg.res", GUI::Size(myWidth, myHeight)); + myOSystem.settings().setValue("dbg.res", GUI::Size(myWidth, myHeight)); delete myBaseDialog; myBaseDialog = myDialog = NULL; - myDialog = new DebuggerDialog(myOSystem, this, 0, 0, myWidth, myHeight); + myDialog = new DebuggerDialog(myOSystem, *this, 0, 0, myWidth, myHeight); myBaseDialog = myDialog; - myRewindManager = new RewindManager(*myOSystem, myDialog->rewindButton()); + myRewindManager = new RewindManager(myOSystem, myDialog->rewindButton()); myCartDebug->setDebugWidget(&(myDialog->cartDebug())); } @@ -191,13 +191,13 @@ void Debugger::initialize() FBInitStatus Debugger::initializeVideo() { string title = string("Stella ") + STELLA_VERSION + ": Debugger mode"; - return myOSystem->frameBuffer().createDisplay(title, myWidth, myHeight); + return myOSystem.frameBuffer().createDisplay(title, myWidth, myHeight); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Debugger::start(const string& message, int address) { - if(myOSystem->eventHandler().enterDebugMode()) + if(myOSystem.eventHandler().enterDebugMode()) { // This must be done *after* we enter debug mode, // so the message isn't erased @@ -215,7 +215,7 @@ bool Debugger::start(const string& message, int address) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Debugger::startWithFatalError(const string& message) { - if(myOSystem->eventHandler().enterDebugMode()) + if(myOSystem.eventHandler().enterDebugMode()) { // This must be done *after* we enter debug mode, // so the dialog is properly shown @@ -229,9 +229,9 @@ bool Debugger::startWithFatalError(const string& message) void Debugger::quit(bool exitrom) { if(exitrom) - myOSystem->eventHandler().handleEvent(Event::LauncherMode, 1); + myOSystem.eventHandler().handleEvent(Event::LauncherMode, 1); else - myOSystem->eventHandler().leaveDebugMode(); + myOSystem.eventHandler().leaveDebugMode(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -240,12 +240,12 @@ string Debugger::autoExec() ostringstream buf; // autoexec.stella is always run - FilesystemNode autoexec(myOSystem->baseDir() + "autoexec.stella"); + FilesystemNode autoexec(myOSystem.baseDir() + "autoexec.stella"); buf << "autoExec():" << endl << myParser->exec(autoexec) << endl; // Also, "romname.stella" if present - FilesystemNode romname(myOSystem->romFile().getPathWithExt(".stella")); + FilesystemNode romname(myOSystem.romFile().getPathWithExt(".stella")); buf << myParser->exec(romname) << endl; // Init builtins @@ -310,7 +310,7 @@ void Debugger::saveState(int state) mySystem.clearDirtyPages(); unlockBankswitchState(); - myOSystem->state().saveState(state); + myOSystem.state().saveState(state); lockBankswitchState(); } @@ -320,7 +320,7 @@ void Debugger::loadState(int state) mySystem.clearDirtyPages(); unlockBankswitchState(); - myOSystem->state().loadState(state); + myOSystem.state().loadState(state); lockBankswitchState(); } @@ -333,7 +333,7 @@ int Debugger::step() int cyc = mySystem.cycles(); unlockBankswitchState(); - myOSystem->console().tia().updateScanlineByStep(); + myOSystem.console().tia().updateScanlineByStep(); lockBankswitchState(); return mySystem.cycles() - cyc; @@ -362,7 +362,7 @@ int Debugger::trace() int targetPC = myCpuDebug->pc() + 3; // return address unlockBankswitchState(); - myOSystem->console().tia().updateScanlineByTrace(targetPC); + myOSystem.console().tia().updateScanlineByTrace(targetPC); lockBankswitchState(); return mySystem.cycles() - cyc; @@ -439,7 +439,7 @@ void Debugger::nextScanline(int lines) unlockBankswitchState(); while(lines) { - myOSystem->console().tia().updateScanline(); + myOSystem.console().tia().updateScanline(); --lines; } lockBankswitchState(); @@ -454,7 +454,7 @@ void Debugger::nextFrame(int frames) unlockBankswitchState(); while(frames) { - myOSystem->console().tia().update(); + myOSystem.console().tia().update(); --frames; } lockBankswitchState(); diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 8292a4670..e5cc7f066 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -734,7 +734,7 @@ void DebuggerParser::executeCheat() for(int arg = 0; arg < argCount; arg++) { const string& cheat = argStrings[arg]; - const Cheat* c = debugger.myOSystem->cheat().add("DBG", cheat); + const Cheat* c = debugger.myOSystem.cheat().add("DBG", cheat); if(c && c->enabled()) commandResult << "Cheat code " << cheat << " enabled" << endl; else diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index da03f3c56..ba3f30a30 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -45,7 +45,7 @@ #include "DebuggerDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -DebuggerDialog::DebuggerDialog(OSystem* osystem, DialogContainer* parent, +DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent, int x, int y, int w, int h) : Dialog(osystem, parent, x, y, w, h), myTab(NULL), diff --git a/src/debugger/gui/DebuggerDialog.hxx b/src/debugger/gui/DebuggerDialog.hxx index ece820d90..2972cc499 100644 --- a/src/debugger/gui/DebuggerDialog.hxx +++ b/src/debugger/gui/DebuggerDialog.hxx @@ -49,7 +49,7 @@ class DebuggerDialog : public Dialog kLargeFontMinW = 1300, kLargeFontMinH = 940 }; - DebuggerDialog(OSystem* osystem, DialogContainer* parent, + DebuggerDialog(OSystem& osystem, DialogContainer& parent, int x, int y, int w, int h); ~DebuggerDialog(); diff --git a/src/debugger/gui/RomListSettings.cxx b/src/debugger/gui/RomListSettings.cxx index 72a6689af..116c158d8 100644 --- a/src/debugger/gui/RomListSettings.cxx +++ b/src/debugger/gui/RomListSettings.cxx @@ -26,7 +26,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RomListSettings::RomListSettings(GuiObject* boss, const GUI::Font& font) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 16, 16), + : Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16), CommandSender(boss), _xorig(0), _yorig(0) diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index ad0e770da..57918ac7e 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -193,9 +193,9 @@ bool OSystem::create() #endif // Create menu and launcher GUI objects - myMenu = new Menu(this); - myCommandMenu = new CommandMenu(this); - myLauncher = new Launcher(this); + myMenu = new Menu(*this); + myCommandMenu = new CommandMenu(*this); + myLauncher = new Launcher(*this); myStateManager = new StateManager(*this); // Create the sound object; the sound subsystem isn't actually diff --git a/src/gui/AboutDialog.cxx b/src/gui/AboutDialog.cxx index 6f30dc189..fda14b908 100644 --- a/src/gui/AboutDialog.cxx +++ b/src/gui/AboutDialog.cxx @@ -25,7 +25,7 @@ #include "AboutDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent, +AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font) : Dialog(osystem, parent, 0, 0, 0, 0), myPage(1), diff --git a/src/gui/AboutDialog.hxx b/src/gui/AboutDialog.hxx index 8f1db6ea5..fd94f32b4 100644 --- a/src/gui/AboutDialog.hxx +++ b/src/gui/AboutDialog.hxx @@ -32,9 +32,9 @@ class StaticTextWidget; class AboutDialog : public Dialog { public: - AboutDialog(OSystem* osystem, DialogContainer* parent, + AboutDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); - ~AboutDialog(); + virtual ~AboutDialog(); protected: ButtonWidget* myNextButton; @@ -49,8 +49,8 @@ class AboutDialog : public Dialog int myLinesPerPage; private: - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - virtual void updateStrings(int page, int lines, string& title); + void handleCommand(CommandSender* sender, int cmd, int data, int id); + void updateStrings(int page, int lines, string& title); void displayInfo(); void loadConfig() { displayInfo(); } diff --git a/src/gui/AudioDialog.cxx b/src/gui/AudioDialog.cxx index 3c0056b68..b88cdcfee 100644 --- a/src/gui/AudioDialog.cxx +++ b/src/gui/AudioDialog.cxx @@ -35,7 +35,7 @@ #include "AudioDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent, +AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font) : Dialog(osystem, parent, 0, 0, 0, 0) { diff --git a/src/gui/AudioDialog.hxx b/src/gui/AudioDialog.hxx index 644a6a895..91c2242d0 100644 --- a/src/gui/AudioDialog.hxx +++ b/src/gui/AudioDialog.hxx @@ -34,8 +34,8 @@ class OSystem; class AudioDialog : public Dialog { public: - AudioDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font); - ~AudioDialog(); + AudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); + virtual ~AudioDialog(); protected: SliderWidget* myVolumeSlider; @@ -50,7 +50,7 @@ class AudioDialog : public Dialog void setDefaults(); void handleSoundEnableChange(bool active); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); enum { kVolumeChanged = 'ADvc', diff --git a/src/gui/BrowserDialog.cxx b/src/gui/BrowserDialog.cxx index 64d2742aa..b06d50ecb 100644 --- a/src/gui/BrowserDialog.cxx +++ b/src/gui/BrowserDialog.cxx @@ -39,7 +39,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font, int max_w, int max_h) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0), + : Dialog(boss->instance(), boss->parent(), 0, 0, 0, 0), CommandSender(boss) { // Set real dimensions diff --git a/src/gui/BrowserDialog.hxx b/src/gui/BrowserDialog.hxx index ce04be082..10bf974ff 100644 --- a/src/gui/BrowserDialog.hxx +++ b/src/gui/BrowserDialog.hxx @@ -52,7 +52,7 @@ class BrowserDialog : public Dialog, public CommandSender const FilesystemNode& getResult() const; protected: - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); void updateUI(); private: diff --git a/src/gui/ComboDialog.cxx b/src/gui/ComboDialog.cxx index 19540ff67..8a2e6172c 100644 --- a/src/gui/ComboDialog.cxx +++ b/src/gui/ComboDialog.cxx @@ -36,7 +36,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font, const VariantList& combolist) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0), + : Dialog(boss->instance(), boss->parent(), 0, 0, 0, 0), myComboEvent(Event::NoType) { #define ADD_EVENT_POPUP(IDX, LABEL) \ diff --git a/src/gui/ComboDialog.hxx b/src/gui/ComboDialog.hxx index 594c94e51..097605c1c 100644 --- a/src/gui/ComboDialog.hxx +++ b/src/gui/ComboDialog.hxx @@ -33,7 +33,7 @@ class ComboDialog : public Dialog { public: ComboDialog(GuiObject* boss, const GUI::Font& font, const VariantList& combolist); - ~ComboDialog(); + virtual ~ComboDialog(); /** Place the dialog onscreen and center it */ void show(Event::Type event, const string& name); diff --git a/src/gui/CommandDialog.cxx b/src/gui/CommandDialog.cxx index 7eaaf5044..36687f81a 100644 --- a/src/gui/CommandDialog.cxx +++ b/src/gui/CommandDialog.cxx @@ -31,7 +31,7 @@ new ButtonWidget(this, font, xoffset, yoffset, buttonWidth, buttonHeight, label, cmd); xoffset += buttonWidth + 6 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CommandDialog::CommandDialog(OSystem* osystem, DialogContainer* parent) +CommandDialog::CommandDialog(OSystem& osystem, DialogContainer& parent) : Dialog(osystem, parent, 0, 0, 16, 16) { const GUI::Font& font = instance().frameBuffer().font(); diff --git a/src/gui/CommandDialog.hxx b/src/gui/CommandDialog.hxx index c57b66e86..0dd99707f 100644 --- a/src/gui/CommandDialog.hxx +++ b/src/gui/CommandDialog.hxx @@ -30,11 +30,11 @@ class OSystem; class CommandDialog : public Dialog { public: - CommandDialog(OSystem* osystem, DialogContainer* parent); + CommandDialog(OSystem& osystem, DialogContainer& parent); ~CommandDialog(); protected: - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); enum { kSelectCmd = 'Csel', diff --git a/src/gui/CommandMenu.cxx b/src/gui/CommandMenu.cxx index aad1e9fd4..389a7636c 100644 --- a/src/gui/CommandMenu.cxx +++ b/src/gui/CommandMenu.cxx @@ -22,10 +22,10 @@ #include "CommandMenu.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CommandMenu::CommandMenu(OSystem* osystem) +CommandMenu::CommandMenu(OSystem& osystem) : DialogContainer(osystem) { - myBaseDialog = new CommandDialog(myOSystem, this); + myBaseDialog = new CommandDialog(myOSystem, *this); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/CommandMenu.hxx b/src/gui/CommandMenu.hxx index f9af6a9bb..99129edaf 100644 --- a/src/gui/CommandMenu.hxx +++ b/src/gui/CommandMenu.hxx @@ -37,7 +37,7 @@ class CommandMenu : public DialogContainer /** Create a new menu stack */ - CommandMenu(OSystem* osystem); + CommandMenu(OSystem& osystem); /** Destructor diff --git a/src/gui/ConfigPathDialog.cxx b/src/gui/ConfigPathDialog.cxx index af2e45481..c2f293dd2 100644 --- a/src/gui/ConfigPathDialog.cxx +++ b/src/gui/ConfigPathDialog.cxx @@ -30,7 +30,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ConfigPathDialog::ConfigPathDialog( - OSystem* osystem, DialogContainer* parent, + OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0), diff --git a/src/gui/ConfigPathDialog.hxx b/src/gui/ConfigPathDialog.hxx index fcb663088..4b24a4cdd 100644 --- a/src/gui/ConfigPathDialog.hxx +++ b/src/gui/ConfigPathDialog.hxx @@ -36,10 +36,10 @@ class StaticTextWidget; class ConfigPathDialog : public Dialog, public CommandSender { public: - ConfigPathDialog(OSystem* osystem, DialogContainer* parent, + ConfigPathDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss, int max_w, int max_h); - ~ConfigPathDialog(); + virtual ~ConfigPathDialog(); void handleCommand(CommandSender* sender, int cmd, int data, int id); diff --git a/src/gui/ContextMenu.cxx b/src/gui/ContextMenu.cxx index bb42fa526..85812a2c2 100644 --- a/src/gui/ContextMenu.cxx +++ b/src/gui/ContextMenu.cxx @@ -27,7 +27,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ContextMenu::ContextMenu(GuiObject* boss, const GUI::Font& font, const VariantList& items, int cmd) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 16, 16), + : Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16), CommandSender(boss), _rowHeight(font.getLineHeight()), _firstEntry(0), diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 4ce63b38e..bb54fd6b9 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -36,9 +36,9 @@ * ... */ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Dialog::Dialog(OSystem* instance, DialogContainer* parent, +Dialog::Dialog(OSystem& instance, DialogContainer& parent, int x, int y, int w, int h) - : GuiObject(*instance, *parent, *this, x, y, w, h), + : GuiObject(instance, parent, *this, x, y, w, h), _mouseWidget(0), _focusedWidget(0), _dragWidget(0), @@ -656,7 +656,7 @@ void Dialog::handleCommand(CommandSender* sender, int cmd, int data, int id) * in the local coordinate system, i.e. relative to the top left of the dialog. */ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Widget* Dialog::findWidget(int x, int y) +Widget* Dialog::findWidget(int x, int y) const { return Widget::findWidgetInChain(_firstWidget, x, y); } diff --git a/src/gui/Dialog.hxx b/src/gui/Dialog.hxx index ed72abb24..4d6ef2cdc 100644 --- a/src/gui/Dialog.hxx +++ b/src/gui/Dialog.hxx @@ -47,7 +47,7 @@ class Dialog : public GuiObject friend class DialogContainer; public: - Dialog(OSystem* instance, DialogContainer* parent, + Dialog(OSystem& instance, DialogContainer& parent, int x, int y, int w, int h); virtual ~Dialog(); @@ -101,7 +101,7 @@ class Dialog : public GuiObject virtual bool handleJoyHat(int stick, int hat, int value); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - Widget* findWidget(int x, int y); // Find the widget at pos x,y if any + Widget* findWidget(int x, int y) const; // Find the widget at pos x,y if any void addOKCancelBGroup(WidgetArray& wid, const GUI::Font& font, const string& okText = "", diff --git a/src/gui/DialogContainer.cxx b/src/gui/DialogContainer.cxx index d5da134dc..13827f46a 100644 --- a/src/gui/DialogContainer.cxx +++ b/src/gui/DialogContainer.cxx @@ -26,7 +26,7 @@ #include "DialogContainer.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -DialogContainer::DialogContainer(OSystem* osystem) +DialogContainer::DialogContainer(OSystem& osystem) : myOSystem(osystem), myBaseDialog(NULL), myTime(0) @@ -132,7 +132,7 @@ void DialogContainer::reStack() myBaseDialog->open(false); // don't force a refresh - myOSystem->frameBuffer().refresh(); + myOSystem.frameBuffer().refresh(); // Reset all continuous events reset(); diff --git a/src/gui/DialogContainer.hxx b/src/gui/DialogContainer.hxx index 4adffe24e..159c8afae 100644 --- a/src/gui/DialogContainer.hxx +++ b/src/gui/DialogContainer.hxx @@ -48,7 +48,7 @@ class DialogContainer /** Create a new DialogContainer stack */ - DialogContainer(OSystem* osystem); + DialogContainer(OSystem& osystem); /** Destructor @@ -154,9 +154,9 @@ class DialogContainer void removeDialog(); protected: - OSystem* myOSystem; + OSystem& myOSystem; Dialog* myBaseDialog; - Common::FixedStack myDialogStack; + Common::FixedStack myDialogStack; private: enum { diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 357f79d5a..e19e850fa 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -35,7 +35,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GameInfoDialog::GameInfoDialog( - OSystem* osystem, DialogContainer* parent, const GUI::Font& font, + OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss) : Dialog(osystem, parent, 0, 0, 0, 0), CommandSender(boss), diff --git a/src/gui/GameInfoDialog.hxx b/src/gui/GameInfoDialog.hxx index 069961a3f..5dc54bdbc 100644 --- a/src/gui/GameInfoDialog.hxx +++ b/src/gui/GameInfoDialog.hxx @@ -35,7 +35,7 @@ class SliderWidget; class GameInfoDialog : public Dialog, public CommandSender { public: - GameInfoDialog(OSystem* osystem, DialogContainer* parent, + GameInfoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss); virtual ~GameInfoDialog(); diff --git a/src/gui/GlobalPropsDialog.cxx b/src/gui/GlobalPropsDialog.cxx index 5835f5a43..c87f4893a 100644 --- a/src/gui/GlobalPropsDialog.cxx +++ b/src/gui/GlobalPropsDialog.cxx @@ -33,7 +33,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0), + : Dialog(boss->instance(), boss->parent(), 0, 0, 0, 0), CommandSender(boss) { const int lineHeight = font.getLineHeight(), diff --git a/src/gui/GlobalPropsDialog.hxx b/src/gui/GlobalPropsDialog.hxx index 621014fbb..d66bb6e07 100644 --- a/src/gui/GlobalPropsDialog.hxx +++ b/src/gui/GlobalPropsDialog.hxx @@ -42,7 +42,7 @@ class GlobalPropsDialog : public Dialog, public CommandSender void saveConfig(); void setDefaults(); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); private: enum { diff --git a/src/gui/GuiObject.hxx b/src/gui/GuiObject.hxx index 4c2da3f47..9a5d4b438 100644 --- a/src/gui/GuiObject.hxx +++ b/src/gui/GuiObject.hxx @@ -73,9 +73,9 @@ class GuiObject : public CommandReceiver virtual ~GuiObject() {} - OSystem& instance() { return myOSystem; } - DialogContainer& parent() { return myParent; } - Dialog& dialog() { return myDialog; } + OSystem& instance() const { return myOSystem; } + DialogContainer& parent() const { return myParent; } + Dialog& dialog() const { return myDialog; } virtual int getAbsX() const { return _x; } virtual int getAbsY() const { return _y; } diff --git a/src/gui/HelpDialog.cxx b/src/gui/HelpDialog.cxx index 311bf68ef..3eebca301 100644 --- a/src/gui/HelpDialog.cxx +++ b/src/gui/HelpDialog.cxx @@ -26,7 +26,7 @@ #include "HelpDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent, +HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font) : Dialog(osystem, parent, 0, 0, 0, 0), myPage(1), diff --git a/src/gui/HelpDialog.hxx b/src/gui/HelpDialog.hxx index 14816ea65..07597a49c 100644 --- a/src/gui/HelpDialog.hxx +++ b/src/gui/HelpDialog.hxx @@ -32,8 +32,8 @@ class OSystem; class HelpDialog : public Dialog { public: - HelpDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font); - ~HelpDialog(); + HelpDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); + virtual ~HelpDialog(); protected: enum { kLINES_PER_PAGE = 10 }; @@ -50,8 +50,8 @@ class HelpDialog : public Dialog uInt8 myNumPages; private: - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - virtual void updateStrings(uInt8 page, uInt8 lines, string& title); + void handleCommand(CommandSender* sender, int cmd, int data, int id); + void updateStrings(uInt8 page, uInt8 lines, string& title); void displayInfo(); void loadConfig() { displayInfo(); } }; diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index 8ccf87443..d07576aab 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -35,7 +35,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent, +InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0) { diff --git a/src/gui/InputDialog.hxx b/src/gui/InputDialog.hxx index 0f76344ba..b78e84ee9 100644 --- a/src/gui/InputDialog.hxx +++ b/src/gui/InputDialog.hxx @@ -36,16 +36,16 @@ class StaticTextWidget; class InputDialog : public Dialog { public: - InputDialog(OSystem* osystem, DialogContainer* parent, + InputDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h); - ~InputDialog(); + virtual ~InputDialog(); protected: - virtual void handleKeyDown(StellaKey key, StellaMod mod); - virtual void handleJoyDown(int stick, int button); - virtual void handleJoyAxis(int stick, int axis, int value); - virtual bool handleJoyHat(int stick, int hat, int value); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleKeyDown(StellaKey key, StellaMod mod); + void handleJoyDown(int stick, int button); + void handleJoyAxis(int stick, int axis, int value); + bool handleJoyHat(int stick, int hat, int value); + void handleCommand(CommandSender* sender, int cmd, int data, int id); void loadConfig(); void saveConfig(); diff --git a/src/gui/InputTextDialog.cxx b/src/gui/InputTextDialog.cxx index 10ee0dfd9..48a635023 100644 --- a/src/gui/InputTextDialog.cxx +++ b/src/gui/InputTextDialog.cxx @@ -31,7 +31,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& font, const StringList& labels) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 16, 16), + : Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16), CommandSender(boss), myEnableCenter(false), myErrorFlag(false), @@ -45,7 +45,7 @@ InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& font, InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, const StringList& labels) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 16, 16), + : Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16), CommandSender(boss), myEnableCenter(false), myErrorFlag(false), diff --git a/src/gui/InputTextDialog.hxx b/src/gui/InputTextDialog.hxx index 1bb76cae7..70d17e3a9 100644 --- a/src/gui/InputTextDialog.hxx +++ b/src/gui/InputTextDialog.hxx @@ -56,7 +56,7 @@ class InputTextDialog : public Dialog, public CommandSender protected: void initialize(const GUI::Font& lfont, const GUI::Font& nfont, const StringList& labels); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); private: typedef Common::Array InputWidget; diff --git a/src/gui/Launcher.cxx b/src/gui/Launcher.cxx index 81722738a..44352fbdd 100644 --- a/src/gui/Launcher.cxx +++ b/src/gui/Launcher.cxx @@ -28,11 +28,11 @@ #include "Launcher.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Launcher::Launcher(OSystem* osystem) +Launcher::Launcher(OSystem& osystem) : DialogContainer(osystem) { - const GUI::Size& s = myOSystem->settings().getSize("launcherres"); - const GUI::Size& d = myOSystem->frameBuffer().desktopSize(); + const GUI::Size& s = myOSystem.settings().getSize("launcherres"); + const GUI::Size& d = myOSystem.frameBuffer().desktopSize(); myWidth = s.w; myHeight = s.h; // The launcher dialog is resizable, within certain bounds @@ -42,10 +42,10 @@ Launcher::Launcher(OSystem* osystem) myWidth = BSPF_min(myWidth, (uInt32)d.w); myHeight = BSPF_min(myHeight, (uInt32)d.h); - myOSystem->settings().setValue("launcherres", - GUI::Size(myWidth, myHeight)); + myOSystem.settings().setValue("launcherres", + GUI::Size(myWidth, myHeight)); - myBaseDialog = new LauncherDialog(myOSystem, this, 0, 0, myWidth, myHeight); + myBaseDialog = new LauncherDialog(myOSystem, *this, 0, 0, myWidth, myHeight); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -57,7 +57,7 @@ Launcher::~Launcher() FBInitStatus Launcher::initializeVideo() { string title = string("Stella ") + STELLA_VERSION; - return myOSystem->frameBuffer().createDisplay(title, myWidth, myHeight); + return myOSystem.frameBuffer().createDisplay(title, myWidth, myHeight); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/Launcher.hxx b/src/gui/Launcher.hxx index 80a397c49..d717e9287 100644 --- a/src/gui/Launcher.hxx +++ b/src/gui/Launcher.hxx @@ -39,7 +39,7 @@ class Launcher : public DialogContainer /** Create a new menu stack */ - Launcher(OSystem* osystem); + Launcher(OSystem& osystem); /** Destructor diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 036541336..4babf1535 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -46,7 +46,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent, +LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent, int x, int y, int w, int h) : Dialog(osystem, parent, x, y, w, h), myStartButton(NULL), @@ -183,14 +183,14 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent, l.push_back("Power-on options", "override"); l.push_back("Filter listing", "filter"); l.push_back("Reload listing", "reload"); - myMenu = new ContextMenu(this, osystem->frameBuffer().font(), l); + myMenu = new ContextMenu(this, osystem.frameBuffer().font(), l); // Create global props dialog, which is used to temporarily overrride // ROM properties - myGlobalProps = new GlobalPropsDialog(this, osystem->frameBuffer().font()); + myGlobalProps = new GlobalPropsDialog(this, osystem.frameBuffer().font()); // Create dialog whereby the files shown in the ROM listing can be customized - myFilters = new LauncherFilterDialog(this, osystem->frameBuffer().font()); + myFilters = new LauncherFilterDialog(this, osystem.frameBuffer().font()); // Figure out which filters are needed for the ROM listing setListFilters(); diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index 1d0c8eb5f..8ddd383e2 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -56,9 +56,9 @@ class LauncherDialog : public Dialog }; public: - LauncherDialog(OSystem* osystem, DialogContainer* parent, + LauncherDialog(OSystem& osystem, DialogContainer& parent, int x, int y, int w, int h); - ~LauncherDialog(); + virtual ~LauncherDialog(); /** Get MD5sum for the currently selected file diff --git a/src/gui/LauncherFilterDialog.cxx b/src/gui/LauncherFilterDialog.cxx index 1240d2ba1..e4f184ad0 100644 --- a/src/gui/LauncherFilterDialog.cxx +++ b/src/gui/LauncherFilterDialog.cxx @@ -35,7 +35,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LauncherFilterDialog::LauncherFilterDialog(GuiObject* boss, const GUI::Font& font) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0), + : Dialog(boss->instance(), boss->parent(), 0, 0, 0, 0), CommandSender(boss) { const int lineHeight = font.getLineHeight(), diff --git a/src/gui/LauncherFilterDialog.hxx b/src/gui/LauncherFilterDialog.hxx index ff98be475..3c45fbc6c 100644 --- a/src/gui/LauncherFilterDialog.hxx +++ b/src/gui/LauncherFilterDialog.hxx @@ -64,7 +64,7 @@ class LauncherFilterDialog : public Dialog, public CommandSender void setDefaults(); void handleFileTypeChange(const string& type); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); private: PopUpWidget* myFileType; diff --git a/src/gui/LoggerDialog.cxx b/src/gui/LoggerDialog.cxx index 29ba2b743..785aae533 100644 --- a/src/gui/LoggerDialog.cxx +++ b/src/gui/LoggerDialog.cxx @@ -35,7 +35,7 @@ #include "LoggerDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -LoggerDialog::LoggerDialog(OSystem* osystem, DialogContainer* parent, +LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0), myLogInfo(NULL) diff --git a/src/gui/LoggerDialog.hxx b/src/gui/LoggerDialog.hxx index 8ce2e111b..09336cce2 100644 --- a/src/gui/LoggerDialog.hxx +++ b/src/gui/LoggerDialog.hxx @@ -32,7 +32,7 @@ class StringListWidget; class LoggerDialog : public Dialog { public: - LoggerDialog(OSystem* osystem, DialogContainer* parent, + LoggerDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h); virtual ~LoggerDialog(); @@ -41,7 +41,7 @@ class LoggerDialog : public Dialog void saveConfig(); void saveLogFile(); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); private: StringListWidget* myLogInfo; diff --git a/src/gui/Menu.cxx b/src/gui/Menu.cxx index a4abfa818..993a8744e 100644 --- a/src/gui/Menu.cxx +++ b/src/gui/Menu.cxx @@ -26,10 +26,10 @@ class Properties; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Menu::Menu(OSystem* osystem) +Menu::Menu(OSystem& osystem) : DialogContainer(osystem) { - myBaseDialog = new OptionsDialog(myOSystem, this, 0, + myBaseDialog = new OptionsDialog(myOSystem, *this, 0, FrameBuffer::kFBMinW, FrameBuffer::kFBMinH, false); } diff --git a/src/gui/Menu.hxx b/src/gui/Menu.hxx index bf9b7a9c5..4106f76bd 100644 --- a/src/gui/Menu.hxx +++ b/src/gui/Menu.hxx @@ -36,7 +36,7 @@ class Menu : public DialogContainer /** Create a new menu stack */ - Menu(OSystem* osystem); + Menu(OSystem& osystem); /** Destructor diff --git a/src/gui/MessageBox.cxx b/src/gui/MessageBox.cxx index 1a4709a02..46a72c0c3 100644 --- a/src/gui/MessageBox.cxx +++ b/src/gui/MessageBox.cxx @@ -31,7 +31,7 @@ namespace GUI { MessageBox::MessageBox(GuiObject* boss, const GUI::Font& font, const StringList& text, int max_w, int max_h, int cmd, const string& okText, const string& cancelText) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, max_w, max_h), + : Dialog(boss->instance(), boss->parent(), 0, 0, max_w, max_h), CommandSender(boss), myCmd(cmd) { @@ -46,7 +46,7 @@ MessageBox::MessageBox(GuiObject* boss, const GUI::Font& font, MessageBox::MessageBox(GuiObject* boss, const GUI::Font& font, const string& text, int max_w, int max_h, int cmd, const string& okText, const string& cancelText) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, max_w, max_h), + : Dialog(boss->instance(), boss->parent(), 0, 0, max_w, max_h), CommandSender(boss), myCmd(cmd) { diff --git a/src/gui/OptionsDialog.cxx b/src/gui/OptionsDialog.cxx index 09019cdfd..169567d7f 100644 --- a/src/gui/OptionsDialog.cxx +++ b/src/gui/OptionsDialog.cxx @@ -46,7 +46,7 @@ new ButtonWidget(this, font, xoffset, yoffset, buttonWidth, buttonHeight, label, cmd); yoffset += rowHeight // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent, +OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent, GuiObject* boss, int max_w, int max_h, bool global) : Dialog(osystem, parent, 0, 0, 0, 0), myVideoDialog(NULL), diff --git a/src/gui/OptionsDialog.hxx b/src/gui/OptionsDialog.hxx index 0c4bab6ea..df55ac44a 100644 --- a/src/gui/OptionsDialog.hxx +++ b/src/gui/OptionsDialog.hxx @@ -43,13 +43,13 @@ class OSystem; class OptionsDialog : public Dialog { public: - OptionsDialog(OSystem* osystem, DialogContainer* parent, GuiObject* boss, + OptionsDialog(OSystem& osystem, DialogContainer& parent, GuiObject* boss, int max_w, int max_h, bool global); virtual ~OptionsDialog(); private: void loadConfig(); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); private: VideoDialog* myVideoDialog; diff --git a/src/gui/ProgressDialog.cxx b/src/gui/ProgressDialog.cxx index 4ab1168f4..741d1991a 100644 --- a/src/gui/ProgressDialog.cxx +++ b/src/gui/ProgressDialog.cxx @@ -28,7 +28,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font, const string& message) - : Dialog(&boss->instance(), &boss->parent(), 0, 0, 16, 16), + : Dialog(boss->instance(), boss->parent(), 0, 0, 16, 16), myMessage(NULL), mySlider(NULL), myStart(0), diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index 24107a696..7be97b006 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -34,7 +34,7 @@ #include "RomAuditDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -RomAuditDialog::RomAuditDialog(OSystem* osystem, DialogContainer* parent, +RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0), myBrowser(NULL), diff --git a/src/gui/RomAuditDialog.hxx b/src/gui/RomAuditDialog.hxx index 81af0738d..e22fd16c6 100644 --- a/src/gui/RomAuditDialog.hxx +++ b/src/gui/RomAuditDialog.hxx @@ -35,9 +35,9 @@ class StaticTextWidget; class RomAuditDialog : public Dialog { public: - RomAuditDialog(OSystem* osystem, DialogContainer* parent, + RomAuditDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h); - ~RomAuditDialog(); + virtual ~RomAuditDialog(); void handleCommand(CommandSender* sender, int cmd, int data, int id); diff --git a/src/gui/SnapshotDialog.cxx b/src/gui/SnapshotDialog.cxx index d4f133374..743fb1a7f 100644 --- a/src/gui/SnapshotDialog.cxx +++ b/src/gui/SnapshotDialog.cxx @@ -30,7 +30,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SnapshotDialog::SnapshotDialog( - OSystem* osystem, DialogContainer* parent, + OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0), diff --git a/src/gui/SnapshotDialog.hxx b/src/gui/SnapshotDialog.hxx index 7ca785e92..ad52d69cc 100644 --- a/src/gui/SnapshotDialog.hxx +++ b/src/gui/SnapshotDialog.hxx @@ -36,10 +36,10 @@ class StaticTextWidget; class SnapshotDialog : public Dialog { public: - SnapshotDialog(OSystem* osystem, DialogContainer* parent, + SnapshotDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss, int max_w, int max_h); - ~SnapshotDialog(); + virtual ~SnapshotDialog(); void handleCommand(CommandSender* sender, int cmd, int data, int id); diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index c58ae21e3..ff6b469e3 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -37,7 +37,7 @@ #include "UIDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent, +UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font) : Dialog(osystem, parent, 0, 0, 0, 0) { diff --git a/src/gui/UIDialog.hxx b/src/gui/UIDialog.hxx index 3b4fa9913..99a2aa9c4 100644 --- a/src/gui/UIDialog.hxx +++ b/src/gui/UIDialog.hxx @@ -35,8 +35,8 @@ class OSystem; class UIDialog : public Dialog { public: - UIDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font); - ~UIDialog(); + UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); + virtual ~UIDialog(); protected: TabWidget* myTab; @@ -67,7 +67,7 @@ class UIDialog : public Dialog void saveConfig(); void setDefaults(); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id); enum { kLWidthChanged = 'UIlw', diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 86cd810fe..de84976f6 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -38,7 +38,7 @@ #include "VideoDialog.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, +VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) : Dialog(osystem, parent, 0, 0, 0, 0) { diff --git a/src/gui/VideoDialog.hxx b/src/gui/VideoDialog.hxx index b2db539ff..ff2728d33 100644 --- a/src/gui/VideoDialog.hxx +++ b/src/gui/VideoDialog.hxx @@ -35,9 +35,9 @@ class OSystem; class VideoDialog : public Dialog { public: - VideoDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font, + VideoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h); - ~VideoDialog(); + virtual ~VideoDialog(); private: void loadConfig();