Cleanup, fix leftovers.

This commit is contained in:
Christian Speckner 2021-01-02 17:29:11 +01:00
parent c531f7f9c8
commit f751e651c9
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 void StellaDb::initializeDb() const
{ {

View File

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

View File

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

View File

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