mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
TINSEL: Take advante of Engine::initializePath.
This makes sure that the game path is only ever added once for the PSX version of DW1. Most noticably this will make the warning about the game path being present in SearchSet disappear on startup.
This commit is contained in:
parent
651e280801
commit
65931d74e3
@ -835,14 +835,6 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
|
||||
// Setup mixer
|
||||
syncSoundSettings();
|
||||
|
||||
// Add DW2 subfolder to search path in case user is running directly from the CDs
|
||||
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "dw2");
|
||||
|
||||
// Add subfolders needed for psx versions of Discworld 1
|
||||
if (TinselV1PSX)
|
||||
SearchMan.addDirectory(gameDataDir.getPath(), gameDataDir, 0, 3, true);
|
||||
|
||||
const GameSettings *g;
|
||||
|
||||
const char *gameid = ConfMan.get("gameid").c_str();
|
||||
@ -892,6 +884,17 @@ Common::String TinselEngine::getSavegameFilename(int16 saveNum) const {
|
||||
return Common::String::format("%s.%03d", getTargetName().c_str(), saveNum);
|
||||
}
|
||||
|
||||
void TinselEngine::initializePath(const Common::FSNode &gamePath) {
|
||||
if (TinselV1PSX) {
|
||||
// Add subfolders needed for psx versions of Discworld 1
|
||||
SearchMan.addDirectory(gamePath.getPath(), gamePath, 0, 3, true);
|
||||
} else {
|
||||
// Add DW2 subfolder to search path in case user is running directly from the CDs
|
||||
SearchMan.addSubDirectoryMatching(gamePath, "dw2");
|
||||
Engine::initializePath(gamePath);
|
||||
}
|
||||
}
|
||||
|
||||
Common::Error TinselEngine::run() {
|
||||
// Initialize backend
|
||||
if (getGameID() == GID_DW2) {
|
||||
|
@ -161,6 +161,7 @@ class TinselEngine : public Engine {
|
||||
protected:
|
||||
|
||||
// Engine APIs
|
||||
virtual void initializePath(const Common::FSNode &gamePath);
|
||||
virtual Common::Error run();
|
||||
virtual bool hasFeature(EngineFeature f) const;
|
||||
Common::Error loadGameState(int slot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user