From 654285675ececa142877d86e6f730d040625fc6e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 16 Jun 2011 01:39:44 +0300 Subject: Add dataPath to branding. --- src/configuration.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/configuration.cpp') diff --git a/src/configuration.cpp b/src/configuration.cpp index abeb4b2af..7969c9341 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -30,6 +30,11 @@ #include +#include +#ifdef WIN32 +#define realpath(N,R) _fullpath((R),(N),_MAX_PATH) +#endif + #include "debug.h" #ifdef DEBUG_CONFIG @@ -388,9 +393,17 @@ void Configuration::init(const std::string &filename, bool useResManager) XML::Document doc(filename, useResManager); if (useResManager) + { mConfigPath = "PhysFS://" + filename; + mDirectory = ""; + } else + { mConfigPath = filename; + char *realPath = realpath(getFileDir(filename).c_str(), NULL); + mDirectory = realPath; + free(realPath); + } if (!doc.rootNode()) { -- cgit v1.2.3-60-g2f50