diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 34dbe4808..ba129bd8a 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -206,8 +206,8 @@ void OSystem::loadConfig(const Settings::Options& options) // Get base directory and config file from derived class // It will decide whether it can override its default location string baseDir, homeDir; - getBaseDirAndConfig(baseDir, homeDir, - ourOverrideBaseDirWithApp, ourOverrideBaseDir); + getBaseDirectories(baseDir, homeDir, + ourOverrideBaseDirWithApp, ourOverrideBaseDir); // Get fully-qualified pathnames, and make directories when needed myBaseDir = FilesystemNode(baseDir); diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 9f4336e5f..23d70042a 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -450,8 +450,8 @@ class OSystem // implemented in derived classes. ////////////////////////////////////////////////////////////////////// /** - Determine the base directory and various other directories from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -462,8 +462,8 @@ class OSystem parameter; not all ports can do this, so they are free to ignore it */ - virtual void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) = 0; + virtual void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) = 0; virtual void initPersistence(FilesystemNode& basedir) = 0; diff --git a/src/emucore/OSystemStandalone.cxx b/src/emucore/OSystemStandalone.cxx index c8beaa313..541d63dfd 100644 --- a/src/emucore/OSystemStandalone.cxx +++ b/src/emucore/OSystemStandalone.cxx @@ -15,8 +15,8 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "OSystemStandalone.hxx" #include "StellaDb.hxx" +#include "OSystemStandalone.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void OSystemStandalone::initPersistence(FilesystemNode& basedir) @@ -34,7 +34,7 @@ string OSystemStandalone::describePresistence() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - shared_ptr OSystemStandalone::getSettingsRepository() { - return shared_ptr(myStellaDb, &myStellaDb->settingsRepository()); + return shared_ptr(myStellaDb, &myStellaDb->settingsRepository()); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/OSystemStandalone.hxx b/src/emucore/OSystemStandalone.hxx index a70ca08f6..bcc8d9b62 100644 --- a/src/emucore/OSystemStandalone.hxx +++ b/src/emucore/OSystemStandalone.hxx @@ -22,7 +22,8 @@ class StellaDb; -class OSystemStandalone : public OSystem { +class OSystemStandalone : public OSystem +{ public: OSystemStandalone() = default; diff --git a/src/libretro/OSystemLIBRETRO.cxx b/src/libretro/OSystemLIBRETRO.cxx index 0053451ec..f38e56c80 100644 --- a/src/libretro/OSystemLIBRETRO.cxx +++ b/src/libretro/OSystemLIBRETRO.cxx @@ -27,15 +27,16 @@ #endif // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemLIBRETRO::getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) +void OSystemLIBRETRO::getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) { basedir = homedir = "." + slash; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void OSystemLIBRETRO::initPersistence(FilesystemNode& basedir) -{} +{ +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string OSystemLIBRETRO::describePresistence() @@ -46,7 +47,7 @@ string OSystemLIBRETRO::describePresistence() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - shared_ptr OSystemLIBRETRO::getSettingsRepository() { - return make_shared(); + return make_shared(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libretro/OSystemLIBRETRO.hxx b/src/libretro/OSystemLIBRETRO.hxx index e668dfcff..40a1679d6 100644 --- a/src/libretro/OSystemLIBRETRO.hxx +++ b/src/libretro/OSystemLIBRETRO.hxx @@ -22,7 +22,7 @@ /** This class defines an OSystem object for libretro. - It is responsible for completely implementing getBaseDirAndConfig(), + It is responsible for completely implementing getBaseDirectories(), to set the base directory and various other save/load locations. @author Stephen Anthony @@ -34,8 +34,8 @@ class OSystemLIBRETRO : public OSystem ~OSystemLIBRETRO() override = default; /** - Determine the base directory and main configuration file from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -46,8 +46,8 @@ class OSystemLIBRETRO : public OSystem parameter; not all ports can do this, so they are free to ignore it */ - void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) override; + void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) override; shared_ptr getSettingsRepository() override; diff --git a/src/macos/OSystemMACOS.cxx b/src/macos/OSystemMACOS.cxx index fb863c21e..011f5b758 100644 --- a/src/macos/OSystemMACOS.cxx +++ b/src/macos/OSystemMACOS.cxx @@ -19,8 +19,8 @@ #include "OSystemMACOS.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemMACOS::getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) +void OSystemMACOS::getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) { basedir = "~/Library/Application Support/Stella/"; diff --git a/src/macos/OSystemMACOS.hxx b/src/macos/OSystemMACOS.hxx index 3a856f5fd..f5e53ef75 100644 --- a/src/macos/OSystemMACOS.hxx +++ b/src/macos/OSystemMACOS.hxx @@ -21,8 +21,8 @@ #include "OSystemStandalone.hxx" /** - This class defines an OSystem object for UNIX-like OS's (macOS). - It is responsible for completely implementing getBaseDirAndConfig(), + This class defines an OSystem object for macOS systems. + It is responsible for completely implementing getBaseDirectories(), to set the base directory and various other save/load locations. @author Stephen Anthony @@ -34,8 +34,8 @@ class OSystemMACOS : public OSystemStandalone ~OSystemMACOS() override = default; /** - Determine the base directory and main configuration file from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -46,8 +46,8 @@ class OSystemMACOS : public OSystemStandalone parameter; not all ports can do this, so they are free to ignore it */ - void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) override; + void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) override; private: // Following constructors and assignment operators not supported diff --git a/src/unix/OSystemUNIX.cxx b/src/unix/OSystemUNIX.cxx index 8472307d1..bac863260 100644 --- a/src/unix/OSystemUNIX.cxx +++ b/src/unix/OSystemUNIX.cxx @@ -22,8 +22,8 @@ #include "OSystemUNIX.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemUNIX::getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) +void OSystemUNIX::getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) { // Use XDG_CONFIG_HOME if defined, otherwise use the default string configDir = BSPF::getenv("XDG_CONFIG_HOME"); diff --git a/src/unix/OSystemUNIX.hxx b/src/unix/OSystemUNIX.hxx index db693f435..4110ef18f 100644 --- a/src/unix/OSystemUNIX.hxx +++ b/src/unix/OSystemUNIX.hxx @@ -22,7 +22,7 @@ /** This class defines an OSystem object for UNIX-like OS's (Linux). - It is responsible for completely implementing getBaseDirAndConfig(), + It is responsible for completely implementing getBaseDirectories(), to set the base directory and various other save/load locations. @author Stephen Anthony @@ -34,8 +34,8 @@ class OSystemUNIX : public OSystemStandalone ~OSystemUNIX() override = default; /** - Determine the base directory and main configuration file from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -46,8 +46,8 @@ class OSystemUNIX : public OSystemStandalone parameter; not all ports can do this, so they are free to ignore it */ - void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) override; + void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) override; private: // Following constructors and assignment operators not supported diff --git a/src/unix/r77/OSystemR77.cxx b/src/unix/r77/OSystemR77.cxx index 8ce36b333..97bce9f7d 100644 --- a/src/unix/r77/OSystemR77.cxx +++ b/src/unix/r77/OSystemR77.cxx @@ -18,8 +18,8 @@ #include "OSystemR77.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemR77::getBaseDirAndConfig(string& basedir, string& homeDir, - bool, const string&) +void OSystemR77::getBaseDirectories(string& basedir, string& homeDir, + bool, const string&) { basedir = homeDir = "/mnt/stella"; } diff --git a/src/unix/r77/OSystemR77.hxx b/src/unix/r77/OSystemR77.hxx index 3f7878ef4..64e4fe613 100644 --- a/src/unix/r77/OSystemR77.hxx +++ b/src/unix/r77/OSystemR77.hxx @@ -24,7 +24,7 @@ This class defines an OSystem object for the Retron77 system.  The Retron77 system is based on an embedded Linux platform. - It is responsible for completely implementing getBaseDirAndConfig(), + It is responsible for completely implementing getBaseDirectories(), to set the base directory and various other save/load locations. @author Stephen Anthony @@ -36,8 +36,8 @@ class OSystemR77 : public OSystemStandalone ~OSystemR77() override = default; /** - Determine the base directory and main configuration file from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -48,8 +48,8 @@ class OSystemR77 : public OSystemStandalone parameter; not all ports can do this, so they are free to ignore it */ - void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) override; + void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) override; private: // Following constructors and assignment operators not supported diff --git a/src/windows/OSystemWINDOWS.cxx b/src/windows/OSystemWINDOWS.cxx index f691f864e..8ccf01098 100644 --- a/src/windows/OSystemWINDOWS.cxx +++ b/src/windows/OSystemWINDOWS.cxx @@ -22,8 +22,8 @@ #include "OSystemWINDOWS.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystemWINDOWS::getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) +void OSystemWINDOWS::getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) { HomeFinder homefinder; FilesystemNode appdata(homefinder.getAppDataPath()); diff --git a/src/windows/OSystemWINDOWS.hxx b/src/windows/OSystemWINDOWS.hxx index 903f00dc6..ef1640152 100644 --- a/src/windows/OSystemWINDOWS.hxx +++ b/src/windows/OSystemWINDOWS.hxx @@ -22,7 +22,7 @@ /** This class defines an OSystem object for Windows OS's. - It is responsible for completely implementing getBaseDirAndConfig(), + It is responsible for completely implementing getBaseDirectories(), to set the base directory and various other save/load locations. @author Stephen Anthony @@ -34,8 +34,8 @@ class OSystemWINDOWS : public OSystemStandalone ~OSystemWINDOWS() override = default; /** - Determine the base directory and main configuration file from the - derived class. It can also use hints, as described below. + Determine the base directory and home directory from the derived + class. It can also use hints, as described below. @param basedir The base directory for all configuration files @param homedir The default directory to store various other files @@ -46,8 +46,8 @@ class OSystemWINDOWS : public OSystemStandalone parameter; not all ports can do this, so they are free to ignore it */ - void getBaseDirAndConfig(string& basedir, string& homedir, - bool useappdir, const string& usedir) override; + void getBaseDirectories(string& basedir, string& homedir, + bool useappdir, const string& usedir) override; private: // Following constructors and assignment operators not supported