diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index b70295770..e05247819 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -48,7 +48,9 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font, VarList::push_back(l, "Fill to scanline", "scanline"); VarList::push_back(l, "Toggle breakpoint", "bp"); VarList::push_back(l, "Set zoom position", "zoom"); +#ifdef PNG_SUPPORT VarList::push_back(l, "Save snapshot", "snap"); +#endif myMenu = make_unique(this, font, l); } diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 3f94bc1d9..879299ab1 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -262,8 +262,11 @@ void OSystem::setConfigPaths() buildDirIfRequired(myStateDir, myBaseDir + "state"); buildDirIfRequired(myNVRamDir, myBaseDir + "nvram"); +#ifdef DEBUGGER_SUPPORT buildDirIfRequired(myCfgDir, myBaseDir + "cfg"); +#endif +#ifdef PNG_SUPPORT mySnapshotSaveDir = mySettings->getString("snapsavedir"); if(mySnapshotSaveDir == "") mySnapshotSaveDir = defaultSaveDir(); buildDirIfRequired(mySnapshotSaveDir, mySnapshotSaveDir); @@ -271,6 +274,7 @@ void OSystem::setConfigPaths() mySnapshotLoadDir = mySettings->getString("snaploaddir"); if(mySnapshotLoadDir == "") mySnapshotLoadDir = defaultLoadDir(); buildDirIfRequired(mySnapshotLoadDir, mySnapshotLoadDir); +#endif myCheatFile = FilesystemNode(myBaseDir + "stella.cht").getPath(); myPaletteFile = FilesystemNode(myBaseDir + "stella.pal").getPath(); diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 46a750ec0..302deebb9 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -174,15 +174,6 @@ class OSystem */ void saveConfig(); - #ifdef DEBUGGER_SUPPORT - /** - Get the ROM debugger of the system. - - @return The debugger object - */ - Debugger& debugger() const { return *myDebugger; } - #endif - #ifdef CHEATCODE_SUPPORT /** Get the cheat manager of the system. @@ -192,13 +183,13 @@ class OSystem CheatManager& cheat() const { return *myCheatManager; } #endif - #ifdef PNG_SUPPORT + #ifdef DEBUGGER_SUPPORT /** - Get the PNG handler of the system. + Get the ROM debugger of the system. - @return The PNGlib object + @return The debugger object */ - PNGLibrary& png() const { return *myPNGLib; } + Debugger& debugger() const { return *myDebugger; } #endif #ifdef GUI_SUPPORT @@ -231,6 +222,15 @@ class OSystem TimeMachine& timeMachine() const { return *myTimeMachine; } #endif + #ifdef PNG_SUPPORT + /** + Get the PNG handler of the system. + + @return The PNGlib object + */ + PNGLibrary& png() const { return *myPNGLib; } + #endif + /** Set all config file paths for the OSystem. */ @@ -246,30 +246,36 @@ class OSystem */ const string& stateDir() const { return myStateDir; } - /** - Return the full/complete directory name for saving and loading - PNG snapshots. - */ - const string& snapshotSaveDir() const { return mySnapshotSaveDir; } - const string& snapshotLoadDir() const { return mySnapshotLoadDir; } - /** Return the full/complete directory name for storing nvram (flash/EEPROM) files. */ const string& nvramDir() const { return myNVRamDir; } - /** - Return the full/complete directory name for storing Distella cfg files. - */ - const string& cfgDir() const { return myCfgDir; } - + #ifdef CHEATCODE_SUPPORT /** This method should be called to get the full path of the cheat file. @return String representing the full path of the cheat filename. */ const string& cheatFile() const { return myCheatFile; } + #endif + + #ifdef DEBUGGER_SUPPORT + /** + Return the full/complete directory name for storing Distella cfg files. + */ + const string& cfgDir() const { return myCfgDir; } + #endif + + #ifdef PNG_SUPPORT + /** + Return the full/complete directory name for saving and loading + PNG snapshots. + */ + const string& snapshotSaveDir() const { return mySnapshotSaveDir; } + const string& snapshotLoadDir() const { return mySnapshotLoadDir; } + #endif /** This method should be called to get the full path of the @@ -483,6 +489,16 @@ class OSystem // Pointer to audio settings object unique_ptr myAudioSettings; + #ifdef CHEATCODE_SUPPORT + // Pointer to the CheatManager object + unique_ptr myCheatManager; + #endif + + #ifdef DEBUGGER_SUPPORT + // Pointer to the Debugger object + unique_ptr myDebugger; + #endif + #ifdef GUI_SUPPORT // Pointer to the Menu object unique_ptr myMenu; @@ -497,16 +513,6 @@ class OSystem unique_ptr myTimeMachine; #endif - #ifdef DEBUGGER_SUPPORT - // Pointer to the Debugger object - unique_ptr myDebugger; - #endif - - #ifdef CHEATCODE_SUPPORT - // Pointer to the CheatManager object - unique_ptr myCheatManager; - #endif - #ifdef PNG_SUPPORT // PNG object responsible for loading/saving PNG images unique_ptr myPNGLib; diff --git a/src/gui/GlobalPropsDialog.cxx b/src/gui/GlobalPropsDialog.cxx index c12b8c0a5..d8911feda 100644 --- a/src/gui/GlobalPropsDialog.cxx +++ b/src/gui/GlobalPropsDialog.cxx @@ -96,7 +96,9 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) new StaticTextWidget(this, font, xpos, ypos+1, "Startup mode"); items.clear(); VarList::push_back(items, "Console", "false"); +#ifdef DEBUGGER_SUPPORT VarList::push_back(items, "Debugger", "true"); +#endif myDebug = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, ""); wid.push_back(myDebug);