mirror of https://github.com/stella-emu/stella.git
Updates to conditional compilation.
- Don't create certain directories when not needed - Don't include certain items in ContextMenu when not applicable
This commit is contained in:
parent
a6412f4ab2
commit
12a95dc176
|
@ -48,7 +48,9 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
VarList::push_back(l, "Fill to scanline", "scanline");
|
VarList::push_back(l, "Fill to scanline", "scanline");
|
||||||
VarList::push_back(l, "Toggle breakpoint", "bp");
|
VarList::push_back(l, "Toggle breakpoint", "bp");
|
||||||
VarList::push_back(l, "Set zoom position", "zoom");
|
VarList::push_back(l, "Set zoom position", "zoom");
|
||||||
|
#ifdef PNG_SUPPORT
|
||||||
VarList::push_back(l, "Save snapshot", "snap");
|
VarList::push_back(l, "Save snapshot", "snap");
|
||||||
|
#endif
|
||||||
myMenu = make_unique<ContextMenu>(this, font, l);
|
myMenu = make_unique<ContextMenu>(this, font, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,8 +262,11 @@ void OSystem::setConfigPaths()
|
||||||
|
|
||||||
buildDirIfRequired(myStateDir, myBaseDir + "state");
|
buildDirIfRequired(myStateDir, myBaseDir + "state");
|
||||||
buildDirIfRequired(myNVRamDir, myBaseDir + "nvram");
|
buildDirIfRequired(myNVRamDir, myBaseDir + "nvram");
|
||||||
|
#ifdef DEBUGGER_SUPPORT
|
||||||
buildDirIfRequired(myCfgDir, myBaseDir + "cfg");
|
buildDirIfRequired(myCfgDir, myBaseDir + "cfg");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_SUPPORT
|
||||||
mySnapshotSaveDir = mySettings->getString("snapsavedir");
|
mySnapshotSaveDir = mySettings->getString("snapsavedir");
|
||||||
if(mySnapshotSaveDir == "") mySnapshotSaveDir = defaultSaveDir();
|
if(mySnapshotSaveDir == "") mySnapshotSaveDir = defaultSaveDir();
|
||||||
buildDirIfRequired(mySnapshotSaveDir, mySnapshotSaveDir);
|
buildDirIfRequired(mySnapshotSaveDir, mySnapshotSaveDir);
|
||||||
|
@ -271,6 +274,7 @@ void OSystem::setConfigPaths()
|
||||||
mySnapshotLoadDir = mySettings->getString("snaploaddir");
|
mySnapshotLoadDir = mySettings->getString("snaploaddir");
|
||||||
if(mySnapshotLoadDir == "") mySnapshotLoadDir = defaultLoadDir();
|
if(mySnapshotLoadDir == "") mySnapshotLoadDir = defaultLoadDir();
|
||||||
buildDirIfRequired(mySnapshotLoadDir, mySnapshotLoadDir);
|
buildDirIfRequired(mySnapshotLoadDir, mySnapshotLoadDir);
|
||||||
|
#endif
|
||||||
|
|
||||||
myCheatFile = FilesystemNode(myBaseDir + "stella.cht").getPath();
|
myCheatFile = FilesystemNode(myBaseDir + "stella.cht").getPath();
|
||||||
myPaletteFile = FilesystemNode(myBaseDir + "stella.pal").getPath();
|
myPaletteFile = FilesystemNode(myBaseDir + "stella.pal").getPath();
|
||||||
|
|
|
@ -174,15 +174,6 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
void saveConfig();
|
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
|
#ifdef CHEATCODE_SUPPORT
|
||||||
/**
|
/**
|
||||||
Get the cheat manager of the system.
|
Get the cheat manager of the system.
|
||||||
|
@ -192,13 +183,13 @@ class OSystem
|
||||||
CheatManager& cheat() const { return *myCheatManager; }
|
CheatManager& cheat() const { return *myCheatManager; }
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef GUI_SUPPORT
|
#ifdef GUI_SUPPORT
|
||||||
|
@ -231,6 +222,15 @@ class OSystem
|
||||||
TimeMachine& timeMachine() const { return *myTimeMachine; }
|
TimeMachine& timeMachine() const { return *myTimeMachine; }
|
||||||
#endif
|
#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.
|
Set all config file paths for the OSystem.
|
||||||
*/
|
*/
|
||||||
|
@ -246,30 +246,36 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
const string& stateDir() const { return myStateDir; }
|
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
|
Return the full/complete directory name for storing nvram
|
||||||
(flash/EEPROM) files.
|
(flash/EEPROM) files.
|
||||||
*/
|
*/
|
||||||
const string& nvramDir() const { return myNVRamDir; }
|
const string& nvramDir() const { return myNVRamDir; }
|
||||||
|
|
||||||
/**
|
#ifdef CHEATCODE_SUPPORT
|
||||||
Return the full/complete directory name for storing Distella cfg files.
|
|
||||||
*/
|
|
||||||
const string& cfgDir() const { return myCfgDir; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to get the full path of the cheat file.
|
This method should be called to get the full path of the cheat file.
|
||||||
|
|
||||||
@return String representing the full path of the cheat filename.
|
@return String representing the full path of the cheat filename.
|
||||||
*/
|
*/
|
||||||
const string& cheatFile() const { return myCheatFile; }
|
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
|
This method should be called to get the full path of the
|
||||||
|
@ -483,6 +489,16 @@ class OSystem
|
||||||
// Pointer to audio settings object
|
// Pointer to audio settings object
|
||||||
unique_ptr<AudioSettings> myAudioSettings;
|
unique_ptr<AudioSettings> myAudioSettings;
|
||||||
|
|
||||||
|
#ifdef CHEATCODE_SUPPORT
|
||||||
|
// Pointer to the CheatManager object
|
||||||
|
unique_ptr<CheatManager> myCheatManager;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUGGER_SUPPORT
|
||||||
|
// Pointer to the Debugger object
|
||||||
|
unique_ptr<Debugger> myDebugger;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GUI_SUPPORT
|
#ifdef GUI_SUPPORT
|
||||||
// Pointer to the Menu object
|
// Pointer to the Menu object
|
||||||
unique_ptr<Menu> myMenu;
|
unique_ptr<Menu> myMenu;
|
||||||
|
@ -497,16 +513,6 @@ class OSystem
|
||||||
unique_ptr<TimeMachine> myTimeMachine;
|
unique_ptr<TimeMachine> myTimeMachine;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
|
||||||
// Pointer to the Debugger object
|
|
||||||
unique_ptr<Debugger> myDebugger;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CHEATCODE_SUPPORT
|
|
||||||
// Pointer to the CheatManager object
|
|
||||||
unique_ptr<CheatManager> myCheatManager;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_SUPPORT
|
#ifdef PNG_SUPPORT
|
||||||
// PNG object responsible for loading/saving PNG images
|
// PNG object responsible for loading/saving PNG images
|
||||||
unique_ptr<PNGLibrary> myPNGLib;
|
unique_ptr<PNGLibrary> myPNGLib;
|
||||||
|
|
|
@ -96,7 +96,9 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
||||||
new StaticTextWidget(this, font, xpos, ypos+1, "Startup mode");
|
new StaticTextWidget(this, font, xpos, ypos+1, "Startup mode");
|
||||||
items.clear();
|
items.clear();
|
||||||
VarList::push_back(items, "Console", "false");
|
VarList::push_back(items, "Console", "false");
|
||||||
|
#ifdef DEBUGGER_SUPPORT
|
||||||
VarList::push_back(items, "Debugger", "true");
|
VarList::push_back(items, "Debugger", "true");
|
||||||
|
#endif
|
||||||
myDebug = new PopUpWidget(this, font, xpos+lwidth, ypos,
|
myDebug = new PopUpWidget(this, font, xpos+lwidth, ypos,
|
||||||
pwidth, lineHeight, items, "");
|
pwidth, lineHeight, items, "");
|
||||||
wid.push_back(myDebug);
|
wid.push_back(myDebug);
|
||||||
|
|
Loading…
Reference in New Issue