File system-resources.patch of Package EmulationStation
--- EmulationStation-2.7.1.orig/es-core/src/resources/ResourceManager.cpp
+++ EmulationStation-2.7.1/es-core/src/resources/ResourceManager.cpp
@@ -32,6 +32,11 @@ std::string ResourceManager::getResource
if(Utils::FileSystem::exists(test))
return test;
+ // check in datapath
+ test = Utils::FileSystem::getDataPath() + "/emulationstation/resources/" + &path[2];
+ if(Utils::FileSystem::exists(test))
+ return test;
+
// check in exepath
test = Utils::FileSystem::getExePath() + "/resources/" + &path[2];
if(Utils::FileSystem::exists(test))
--- EmulationStation-2.7.1.orig/es-core/src/utils/FileSystemUtil.cpp
+++ EmulationStation-2.7.1/es-core/src/utils/FileSystemUtil.cpp
@@ -31,6 +31,7 @@ namespace Utils
{
static std::string homePath = "";
static std::string exePath = "";
+ static std::string dataPath = "";
static std::map<std::string, bool> mPathExistsIndex = std::map<std::string, bool>();
//////////////////////////////////////////////////////////////////////////
@@ -250,6 +251,16 @@ namespace Utils
//////////////////////////////////////////////////////////////////////////
+ std::string getDataPath()
+ {
+ dataPath = getGenericPath("/usr/share");
+
+ // return constructed datapath
+ if(dataPath.length())
+ return dataPath;
+
+ } // getDataPath
+
std::string getPreferredPath(const std::string& _path)
{
std::string path = _path;
--- EmulationStation-2.7.1.orig/es-core/src/utils/FileSystemUtil.h
+++ EmulationStation-2.7.1/es-core/src/utils/FileSystemUtil.h
@@ -18,6 +18,7 @@ namespace Utils
std::string getCWDPath ();
void setExePath (const std::string& _path);
std::string getExePath ();
+ std::string getDataPath ();
std::string getPreferredPath (const std::string& _path);
std::string getGenericPath (const std::string& _path);
std::string getEscapedPath (const std::string& _path);