mirror of
				https://github.com/edubart/otclient.git
				synced 2025-11-03 20:26:23 +01:00 
			
		
		
		
	Platform fixes and rework ping
This commit is contained in:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user