fix finding runtime files relative to the executable path
This commit is contained in:
1 parent
4017d8237e
commit
95381faedc
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -6,9 +6,9 @@ static const std::initializer_list<const char *> Shader_Extensions = {"", ".glsl
|
||||
|
||||
static std::string System_Runtime_Dir;
|
||||
|
||||
void Runtime::init(const char * argv_0, const char * appname)
|
||||
void Runtime::init(const char * executable_path, const char * appname)
|
||||
{
|
||||
System_Runtime_Dir = Path::join(Path::dirname(Path::dirname(argv_0)), "share", appname);
|
||||
System_Runtime_Dir = Path::join(Path::dirname(Path::dirname(executable_path)), "share", appname);
|
||||
}
|
||||
|
||||
std::string Runtime::find(Type t, const std::string & name)
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ public:
|
||||
};
|
||||
|
||||
static std::string find(Type t, const std::string & name);
|
||||
static void init(const char * argv_0, const char * appname);
|
||||
static void init(const char * executable_path, const char * appname);
|
||||
|
||||
protected:
|
||||
static std::string find_first_under(const std::string & runtime_subpath,
|
||||
|
||||
Reference in new issue
Block a user