summaryrefslogtreecommitdiff
path: root/src/dirs.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
commitda05d9dd98315378bdded216184294f376643191 (patch)
treeffc4b984c73c3bb68d26a1df6481634254075744 /src/dirs.cpp
parentec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff)
downloadmv-da05d9dd98315378bdded216184294f376643191.tar.gz
mv-da05d9dd98315378bdded216184294f376643191.tar.bz2
mv-da05d9dd98315378bdded216184294f376643191.tar.xz
mv-da05d9dd98315378bdded216184294f376643191.zip
Use resource manager as global variable.
Diffstat (limited to 'src/dirs.cpp')
-rw-r--r--src/dirs.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp
index e5b3f395b..4e9c5fbd9 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -190,9 +190,9 @@ void Dirs::extractDataDir()
void Dirs::mountDataDir()
{
- const ResourceManager *const resman = ResourceManager::getInstance();
- resman->addToSearchPath(PKG_DATADIR "data/perserver/default", false);
- resman->addToSearchPath("data/perserver/default", false);
+ resourceManager->addToSearchPath(PKG_DATADIR "data/perserver/default",
+ false);
+ resourceManager->addToSearchPath("data/perserver/default", false);
#if defined __APPLE__
CFBundleRef mainBundle = CFBundleGetMainBundle();
@@ -206,27 +206,28 @@ void Dirs::mountDataDir()
CFRelease(resourcesURL);
// possible crash
strncat(path, "/data", PATH_MAX - 1);
- resman->addToSearchPath(path, false);
+ resourceManager->addToSearchPath(path, false);
// possible this need for support run client from dmg images.
// mPackageDir = path;
#endif
- resman->addToSearchPath(PKG_DATADIR "data", false);
+ resourceManager->addToSearchPath(PKG_DATADIR "data", false);
setPackageDir(PKG_DATADIR "data");
- resman->addToSearchPath("data", false);
+ resourceManager->addToSearchPath("data", false);
#ifdef ANDROID
#ifdef USE_SDL2
if (getenv("APPDIR"))
{
const std::string appDir = getenv("APPDIR");
- resman->addToSearchPath(appDir + "/data", false);
- resman->addToSearchPath(appDir + "/data/perserver/default", false);
+ resourceManager->addToSearchPath(appDir + "/data", false);
+ resourceManager->addToSearchPath(appDir + "/data/perserver/default",
+ false);
}
#endif
#endif
#if defined __native_client__
- resman->addToSearchPath(_nacl_dir.append("/data"), false);
+ resourceManager->addToSearchPath(_nacl_dir.append("/data"), false);
#endif
// Add branding/data to PhysFS search path
@@ -244,7 +245,7 @@ void Dirs::mountDataDir()
#endif
if (loc > 0)
{
- resman->addToSearchPath(path.substr(
+ resourceManager->addToSearchPath(path.substr(
0, loc + 1).append("data"), false);
}
}