Got rid of Common::File::addDefaultDirectory, instead implemented the solution proposed in "Case agnostic handling for directories (and files)" on -devel.
svn-id: r44266
This commit is contained in:
parent
75113ad5f3
commit
c50940bbf4
13 changed files with 136 additions and 81 deletions
|
@ -123,6 +123,52 @@ void SearchSet::addDirectory(const String &name, const FSNode &dir, int priority
|
||||||
add(name, new FSDirectory(dir, depth, flat), priority);
|
add(name, new FSDirectory(dir, depth, flat), priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String pattern, bool ignoreCase, int priority) {
|
||||||
|
FSList subDirs;
|
||||||
|
if (!directory.getChildren(subDirs))
|
||||||
|
return;
|
||||||
|
|
||||||
|
String nextPattern;
|
||||||
|
String::const_iterator sep = Common::find(pattern.begin(), pattern.end(), '/');
|
||||||
|
if (sep != pattern.end()) {
|
||||||
|
pattern = String(pattern.begin(), sep);
|
||||||
|
|
||||||
|
++sep;
|
||||||
|
if (sep != pattern.end())
|
||||||
|
nextPattern = String(sep, pattern.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: The code we have for displaying all matches, which vary only in case, might
|
||||||
|
// be a bit overhead, but as long as we want to display all useful information to the
|
||||||
|
// user we will need to keep track of all directory names added so far. We might
|
||||||
|
// want to reconsider this though.
|
||||||
|
typedef HashMap<String, bool, IgnoreCase_Hash, IgnoreCase_EqualTo> MatchList;
|
||||||
|
MatchList multipleMatches;
|
||||||
|
MatchList::iterator matchIter;
|
||||||
|
|
||||||
|
for (FSList::const_iterator i = subDirs.begin(); i != subDirs.end(); ++i) {
|
||||||
|
String name = i->getName();
|
||||||
|
|
||||||
|
if (Common::matchString(name.c_str(), pattern.c_str(), ignoreCase)) {
|
||||||
|
matchIter = multipleMatches.find(name);
|
||||||
|
if (matchIter == multipleMatches.end()) {
|
||||||
|
multipleMatches[name] = true;
|
||||||
|
} else {
|
||||||
|
if (matchIter->_value) {
|
||||||
|
warning("Clash in case for match of pattern \"%s\" found in directory \"%s\": \"%s\"", pattern.c_str(), directory.getPath().c_str(), matchIter->_key.c_str());
|
||||||
|
matchIter->_value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
warning("Clash in case for match of pattern \"%s\" found in directory \"%s\": \"%s\"", pattern.c_str(), directory.getPath().c_str(), name.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nextPattern.empty())
|
||||||
|
addDirectory(name, *i, priority);
|
||||||
|
else
|
||||||
|
addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SearchSet::remove(const String &name) {
|
void SearchSet::remove(const String &name) {
|
||||||
ArchiveNodeList::iterator it = find(name);
|
ArchiveNodeList::iterator it = find(name);
|
||||||
|
|
|
@ -168,6 +168,52 @@ public:
|
||||||
*/
|
*/
|
||||||
void addDirectory(const String &name, const FSNode &directory, int priority = 0, int depth = 1, bool flat = false);
|
void addDirectory(const String &name, const FSNode &directory, int priority = 0, int depth = 1, bool flat = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and add a sub directory by name (caseless).
|
||||||
|
*
|
||||||
|
* It is also possible to add sub directories of sub directories (of any depth) with this function.
|
||||||
|
* The path seperator for this case is SLASH for *all* systems.
|
||||||
|
*
|
||||||
|
* An example would be:
|
||||||
|
*
|
||||||
|
* "game/itedata"
|
||||||
|
*
|
||||||
|
* In this example the code would first try to search for all directories matching
|
||||||
|
* "game" (case insensitive) in the path "directory" first and search through all
|
||||||
|
* of the matches for "itedata" (case insensitive too).
|
||||||
|
*
|
||||||
|
* Note that it will add *all* matches found!
|
||||||
|
*
|
||||||
|
* Even though this method is currently implemented via addSubDirectoriesMatching it is not safe
|
||||||
|
* to assume that this method is using anything other than a simple case insensitive compare.
|
||||||
|
* Thus do not use any tokens like '*' or '?' in the "caselessName" parameter of this function!
|
||||||
|
*/
|
||||||
|
void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0) {
|
||||||
|
addSubDirectoriesMatching(directory, caselessName, true, priority);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and add sub directories by pattern.
|
||||||
|
*
|
||||||
|
* It is also possible to add sub directories of sub directories (of any depth) with this function.
|
||||||
|
* The path seperator for this case is SLASH for *all* systems.
|
||||||
|
*
|
||||||
|
* An example would be:
|
||||||
|
*
|
||||||
|
* "game/itedata"
|
||||||
|
*
|
||||||
|
* In this example the code would first try to search for all directories matching
|
||||||
|
* "game" in the path "directory" first and search through all of the matches for
|
||||||
|
* "itedata". If "ingoreCase" is set to true, the code would do a case insensitive
|
||||||
|
* match, otherwise it is doing a case sensitive match.
|
||||||
|
*
|
||||||
|
* This method works of course also with tokens. For a list of available tokens
|
||||||
|
* see the documentation for Common::matchString.
|
||||||
|
*
|
||||||
|
* @see Common::matchString
|
||||||
|
*/
|
||||||
|
void addSubDirectoriesMatching(const FSNode &directory, String pattern, bool ignoreCase, int priority = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove an archive from the searchable set.
|
* Remove an archive from the searchable set.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,16 +32,6 @@
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
void File::addDefaultDirectory(const String &directory) {
|
|
||||||
FSNode dir(directory);
|
|
||||||
addDefaultDirectory(dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
void File::addDefaultDirectory(const FSNode &dir) {
|
|
||||||
if (dir.exists() && dir.isDirectory())
|
|
||||||
SearchMan.addDirectory(dir.getPath(), dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
File::File()
|
File::File()
|
||||||
: _handle(0) {
|
: _handle(0) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,6 @@ protected:
|
||||||
String _name;
|
String _name;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void addDefaultDirectory(const String &directory);
|
|
||||||
static void addDefaultDirectory(const FSNode &directory);
|
|
||||||
|
|
||||||
File();
|
File();
|
||||||
virtual ~File();
|
virtual ~File();
|
||||||
|
|
||||||
|
|
|
@ -512,24 +512,18 @@ AGOSEngine::AGOSEngine(OSystem *syst)
|
||||||
|
|
||||||
// Add default file directories for Acorn version of
|
// Add default file directories for Acorn version of
|
||||||
// Simon the Sorcerer 1
|
// Simon the Sorcerer 1
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("execute"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "execute");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("EXECUTE"));
|
|
||||||
|
|
||||||
// Add default file directories for Amiga/Macintosh
|
// Add default file directories for Amiga/Macintosh
|
||||||
// verisons of Simon the Sorcerer 2
|
// verisons of Simon the Sorcerer 2
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("voices"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "voices");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("VOICES"));
|
|
||||||
|
|
||||||
// Add default file directories for Amiga & Macintosh
|
// Add default file directories for Amiga & Macintosh
|
||||||
// versions of The Feeble Files
|
// versions of The Feeble Files
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("gfx"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "gfx");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("GFX"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "movies");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("movies"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("MOVIES"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "speech");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("sfx"));
|
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("SFX"));
|
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("speech"));
|
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("SPEECH"));
|
|
||||||
|
|
||||||
g_eventRec.registerRandomSource(_rnd, "agos");
|
g_eventRec.registerRandomSource(_rnd, "agos");
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
|
||||||
_graphicsMan(NULL), _waitingForInput(false) {
|
_graphicsMan(NULL), _waitingForInput(false) {
|
||||||
|
|
||||||
// Adding the default directories
|
// Adding the default directories
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("groovie"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "groovie");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("media"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "media");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("system"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "system");
|
||||||
|
|
||||||
// Initialize the custom debug levels
|
// Initialize the custom debug levels
|
||||||
Common::addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
|
Common::addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
|
||||||
|
|
|
@ -108,9 +108,8 @@ M4Engine::M4Engine(OSystem *syst, const M4GameDescription *gameDesc) :
|
||||||
// FIXME
|
// FIXME
|
||||||
_vm = this;
|
_vm = this;
|
||||||
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir);
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "goodstuf");
|
||||||
Common::File::addDefaultDirectory("goodstuf"); // FIXME: This is nonsense
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "resource");
|
||||||
Common::File::addDefaultDirectory("resource"); // FIXME: This is nonsense
|
|
||||||
|
|
||||||
Common::addDebugChannel(kDebugScript, "script", "Script debug level");
|
Common::addDebugChannel(kDebugScript, "script", "Script debug level");
|
||||||
Common::addDebugChannel(kDebugConversations, "conversations", "Conversations debugging");
|
Common::addDebugChannel(kDebugConversations, "conversations", "Conversations debugging");
|
||||||
|
|
|
@ -93,26 +93,26 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
|
||||||
|
|
||||||
// The Linux version of Inherit the Earth puts all data files in an
|
// The Linux version of Inherit the Earth puts all data files in an
|
||||||
// 'itedata' sub-directory, except for voices.rsc
|
// 'itedata' sub-directory, except for voices.rsc
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("itedata"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "itedata");
|
||||||
|
|
||||||
// The Windows version of Inherit the Earth puts various data files in
|
// The Windows version of Inherit the Earth puts various data files in
|
||||||
// other subdirectories.
|
// other subdirectories.
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("graphics"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "graphics");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("music"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "music");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("sound"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "sound");
|
||||||
|
|
||||||
// The Multi-OS version puts the voices file in the root directory of
|
// The Multi-OS version puts the voices file in the root directory of
|
||||||
// the CD. The rest of the data files are in game/itedata
|
// the CD. The rest of the data files are in game/itedata
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("game").getChild("itedata"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "game/itedata");
|
||||||
|
|
||||||
// Mac CD Wyrmkeep
|
// Mac CD Wyrmkeep
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("patch"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "patch");
|
||||||
|
|
||||||
// Dinotopia
|
// Dinotopia
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("smack"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "smack");
|
||||||
|
|
||||||
// FTA2
|
// FTA2
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("video"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
|
||||||
|
|
||||||
_displayClip.left = _displayClip.top = 0;
|
_displayClip.left = _displayClip.top = 0;
|
||||||
g_eventRec.registerRandomSource(_rnd, "saga");
|
g_eventRec.registerRandomSource(_rnd, "saga");
|
||||||
|
|
|
@ -934,15 +934,14 @@ Common::Error ScummEngine::init() {
|
||||||
// Add default file directories.
|
// Add default file directories.
|
||||||
if (((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) && (_game.version <= 4)) {
|
if (((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) && (_game.version <= 4)) {
|
||||||
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
|
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("ROOMS"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("rooms"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) {
|
if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) {
|
||||||
// This is for the Mac version of Indy3/Loom
|
// This is for the Mac version of Indy3/Loom
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("Rooms 1"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 1");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("Rooms 2"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 2");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("Rooms 3"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 3");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_SCUMM_7_8
|
#ifdef ENABLE_SCUMM_7_8
|
||||||
|
@ -955,25 +954,19 @@ Common::Error ScummEngine::init() {
|
||||||
//
|
//
|
||||||
// This check for whether we play from CD is very crude, though.
|
// This check for whether we play from CD is very crude, though.
|
||||||
|
|
||||||
File::addDefaultDirectory("/Volumes/MONKEY3_1/RESOURCE/");
|
SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_1/RESOURCE");
|
||||||
File::addDefaultDirectory("/Volumes/MONKEY3_1/resource/");
|
SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_2");
|
||||||
File::addDefaultDirectory("/Volumes/MONKEY3_2/");
|
SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_2/RESOURCE");
|
||||||
File::addDefaultDirectory("/Volumes/MONKEY3_2/RESOURCE/");
|
|
||||||
File::addDefaultDirectory("/Volumes/MONKEY3_2/resource/");
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (_game.version == 8) {
|
if (_game.version == 8)
|
||||||
// This is for COMI
|
// This is for COMI
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("RESOURCE"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "resource");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("resource"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_game.version == 7) {
|
if (_game.version == 7) {
|
||||||
// This is for Full Throttle & The Dig
|
// This is for Full Throttle & The Dig
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("VIDEO"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("video"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "data");
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("DATA"));
|
|
||||||
File::addDefaultDirectory(_gameDataDir.getChild("data"));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -56,19 +56,13 @@ SwordEngine::SwordEngine(OSystem *syst)
|
||||||
_features = 0;
|
_features = 0;
|
||||||
|
|
||||||
// Add default file directories
|
// Add default file directories
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("CLUSTERS"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("MUSIC"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "music");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("SPEECH"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "speech");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("VIDEO"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("SMACKSHI"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "smackshi");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("ENGLISH"));//PSX Demo
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "english");//PSX Demo
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("ITALIAN"));//PSX Demo
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "italian");//PSX Demo
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("clusters"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("music"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("speech"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("video"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("smackshi"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SwordEngine::~SwordEngine() {
|
SwordEngine::~SwordEngine() {
|
||||||
|
|
|
@ -257,14 +257,10 @@ namespace Sword2 {
|
||||||
|
|
||||||
Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
|
Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
|
||||||
// Add default file directories
|
// Add default file directories
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("CLUSTERS"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("SWORD2"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "sword2");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("VIDEO"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("SMACKS"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "smacks");
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("clusters"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("sword2"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("video"));
|
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("smacks"));
|
|
||||||
|
|
||||||
if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2demo") || !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psxdemo"))
|
if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2demo") || !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psxdemo"))
|
||||||
_features = GF_DEMO;
|
_features = GF_DEMO;
|
||||||
|
|
|
@ -844,7 +844,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
|
||||||
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
|
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
|
||||||
|
|
||||||
// Add DW2 subfolder to search path in case user is running directly from the CDs
|
// Add DW2 subfolder to search path in case user is running directly from the CDs
|
||||||
Common::File::addDefaultDirectory(_gameDataDir.getChild("dw2"));
|
SearchMan.addSubDirectoryMatching(_gameDataDir, "dw2");
|
||||||
|
|
||||||
// Add subfolders needed for psx versions of Discworld 1
|
// Add subfolders needed for psx versions of Discworld 1
|
||||||
if (TinselV1PSX)
|
if (TinselV1PSX)
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "common/file.h"
|
#include "common/file.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
#include "common/archive.h"
|
||||||
|
|
||||||
#include "graphics/fontman.h"
|
#include "graphics/fontman.h"
|
||||||
#include "graphics/surface.h"
|
#include "graphics/surface.h"
|
||||||
|
@ -514,7 +515,7 @@ Common::Error MT32EmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver
|
||||||
MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) {
|
MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) {
|
||||||
// HACK: It will stay here until engine plugin loader overhaul
|
// HACK: It will stay here until engine plugin loader overhaul
|
||||||
if (ConfMan.hasKey("extrapath"))
|
if (ConfMan.hasKey("extrapath"))
|
||||||
Common::File::addDefaultDirectory(ConfMan.get("extrapath"));
|
SearchMan.addDirectory("extrapath", ConfMan.get("extrapath"));
|
||||||
|
|
||||||
MidiDriver *mididriver;
|
MidiDriver *mididriver;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue