Cleanup, fix leftovers.

This commit is contained in:
Christian Speckner 2021-01-02 17:29:11 +01:00
parent 419a23183f
commit b101fcc7ce
4 changed files with 11 additions and 14 deletions

View File

@ -74,6 +74,12 @@ void StellaDb::initialize()
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const string StellaDb::databaseFileName() const
{
return myDb ? FilesystemNode(myDb->fileName()).getShortPath() : "[failed]";
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StellaDb::initializeDb() const
{

View File

@ -36,7 +36,7 @@ class StellaDb
CompositeKeyValueRepository& propertyRepository() const { return *myPropertyRepository; }
const string& databaseFileName() const { return myDatabaseName; }
const string databaseFileName() const;
private:

View File

@ -126,14 +126,9 @@ bool OSystem::create()
<< "State directory: '"
<< myStateDir.getShortPath() << "'" << endl
<< "NVRam directory: '"
<< myNVRamDir.getShortPath() << "'" << endl;
if(myConfigFile.getPath() != EmptyString)
buf << "Configuration file: '"
<< myConfigFile.getShortPath() << "'" << endl;
buf << "Game properties: '"
<< myPropertiesFile.getShortPath() << "'" << endl
<< myNVRamDir.getShortPath() << "'" << endl
<< "Database file: '"
<< myStellaDb->databaseFileName() << "'" << endl
<< "Cheat file: '"
<< myCheatFile.getShortPath() << "'" << endl
<< "Palette file: '"
@ -225,7 +220,6 @@ void OSystem::loadConfig(const Settings::Options& options)
myStellaDb = make_shared<StellaDb>(myBaseDir.getPath(), "stella");
myStellaDb->initialize();
myConfigFile = FilesystemNode(myStellaDb->databaseFileName());
mySettings->setRepository(getSettingsRepository());
myPropSet->setRepository(getPropertyRepository());
@ -302,7 +296,6 @@ void OSystem::setConfigPaths()
myCheatFile = myBaseDir; myCheatFile /= "stella.cht";
myPaletteFile = myBaseDir; myPaletteFile /= "stella.pal";
myPropertiesFile = myBaseDir; myPropertiesFile /= "stella.pro";
#if 0
// Debug code
@ -318,8 +311,6 @@ void OSystem::setConfigPaths()
dbgPath("sload dir ", mySnapshotLoadDir);
dbgPath("cheat file", myCheatFile);
dbgPath("pal file ", myPaletteFile);
dbgPath("pro file ", myPropertiesFile);
dbgPath("INI file ", myConfigFile);
#endif
}

View File

@ -553,7 +553,7 @@ class OSystem
private:
FilesystemNode myBaseDir, myStateDir, mySnapshotSaveDir, mySnapshotLoadDir,
myNVRamDir, myCfgDir, myHomeDir, myUserDir;
FilesystemNode myCheatFile, myConfigFile, myPaletteFile, myPropertiesFile;
FilesystemNode myCheatFile, myPaletteFile;
FilesystemNode myRomFile; string myRomMD5;
string myFeatures;