|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-11 15:01:32
|
Module: performous
Branch: master
Commit: 9e2f4eb48dbaa475a959e02ce0e20a0326ee38b4
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 11 17:01:41 2009 +0200
Load data from path relative to executable
---
game/fs.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 30e9b21..ee54c24 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -1,6 +1,7 @@
#include "fs.hh"
#include "configuration.hh"
+#include <plugin++/execname.hpp>
#include <cstdlib>
#include <iostream>
@@ -56,6 +57,8 @@ std::string getXdgPath(fs::path const& filename) {
} else {
dir.push_back(getHomeDir() / ".local" / "share" / "performous" );
}
+ // Adding relative path from executable
+ dir.push_back(fs::path(plugin::execname()).parent_path() / ".." / "share" / "performous");
// Adding XDG_DATA_DIRS
char const* xdg_data_dirs = getenv("XDG_DATA_DIRS");
if (xdg_data_dirs) {
|