Platform fixes and rework ping

This commit is contained in:
Eduardo Bart
2013-02-24 17:26:19 -03:00
parent a8c175452b
commit 06e2b6eca2
31 changed files with 178 additions and 111 deletions

View File

@@ -45,10 +45,11 @@ void ResourceManager::terminate()
bool ResourceManager::discoverWorkDir(const std::string& existentFile)
{
// search for modules directory
std::string possiblePaths[] = { g_resources.getCurrentDir(),
std::string possiblePaths[] = { g_platform.getCurrentDir(),
g_resources.getBaseDir(),
g_resources.getBaseDir() + "../",
g_resources.getBaseDir() + "../share/" + g_app.getCompactName() + "/" };
bool found = false;
for(const std::string& dir : possiblePaths) {
if(!PHYSFS_addToSearchPath(dir.c_str(), 0))
@@ -296,11 +297,6 @@ std::string ResourceManager::getRealDir(const std::string& path)
return dir;
}
std::string ResourceManager::getCurrentDir()
{
return g_platform.getCurrentDir();
}
std::string ResourceManager::getBaseDir()
{
return PHYSFS_getBaseDir();