diff options
Diffstat (limited to 'games/openomf/files/patch-src_resources_pathmanager.c')
-rw-r--r-- | games/openomf/files/patch-src_resources_pathmanager.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/games/openomf/files/patch-src_resources_pathmanager.c b/games/openomf/files/patch-src_resources_pathmanager.c index 7e9ec87edaed..365a06c92ef9 100644 --- a/games/openomf/files/patch-src_resources_pathmanager.c +++ b/games/openomf/files/patch-src_resources_pathmanager.c @@ -1,16 +1,16 @@ --- src/resources/pathmanager.c.orig 2016-01-10 17:37:25 UTC +++ src/resources/pathmanager.c -@@ -85,11 +85,11 @@ int pm_init() { - local_path_build(RESOURCE_PATH, bin_base_dir, "resources\\"); - local_path_build(PLUGIN_PATH, bin_base_dir, "plugins\\"); +@@ -133,6 +133,13 @@ int pm_init() { + local_path_build(RESOURCE_PATH, bin_base_dir, "../share/games/openomf/"); + local_path_build(SHADER_PATH, bin_base_dir, "../share/games/openomf/shaders/"); m_ok = 1; -- } else if(!strcasecmp(SDL_GetPlatform(), "Linux")) { -+ } else if(!strcasecmp(SDL_GetPlatform(), "FreeBSD")) { - // on linux, the resources will be in ../share/games/openomf, relative to the binary - // so if openomf is installed to /usr/local/bin, - // the resources will be in /usr/local/share/games/openomf -- local_path_build(RESOURCE_PATH, bin_base_dir, "../share/games/openomf/"); -+ local_path_build(RESOURCE_PATH, %%PREFIX%%, "/share/openomf/"); - local_path_build(PLUGIN_PATH, bin_base_dir, "../lib/openomf/"); - m_ok = 1; - } else if(!strcasecmp(SDL_GetPlatform(), "Mac OS X")) { ++ } else if(strcmp(SDL_GetPlatform(), "FreeBSD") == 0) { ++ // on FreeBSD, the resources will be in ../share/openomf, relative to the binary ++ // so if openomf is installed to %%PREFIX%%/bin, ++ // the resources will be in %%PREFIX%%/share/openomf ++ local_path_build(RESOURCE_PATH, bin_base_dir, "../share/openomf/"); ++ local_path_build(SHADER_PATH, bin_base_dir, "../share/openomf/shaders/"); ++ m_ok = 1; + } else if(strcmp(SDL_GetPlatform(), "Mac OS X") == 0) { + // on OSX, GetBasePath returns the 'Resources' directory + // if run from an app bundle, so we can use this as-is |