mirror of https://github.com/stella-emu/stella.git
Rename method in OSystem to more accurately describe its current functionality.
This commit is contained in:
parent
e373429ba2
commit
9b24e1a413
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<KeyValueRepository> OSystemStandalone::getSettingsRepository()
|
||||
{
|
||||
return shared_ptr<KeyValueRepository>(myStellaDb, &myStellaDb->settingsRepository());
|
||||
return shared_ptr<KeyValueRepository>(myStellaDb, &myStellaDb->settingsRepository());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
class StellaDb;
|
||||
|
||||
class OSystemStandalone : public OSystem {
|
||||
class OSystemStandalone : public OSystem
|
||||
{
|
||||
public:
|
||||
|
||||
OSystemStandalone() = default;
|
||||
|
|
|
@ -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<KeyValueRepository> OSystemLIBRETRO::getSettingsRepository()
|
||||
{
|
||||
return make_shared<KeyValueRepositoryNoop>();
|
||||
return make_shared<KeyValueRepositoryNoop>();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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<KeyValueRepository> getSettingsRepository() override;
|
||||
|
||||
|
|
|
@ -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/";
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue