From b77327aec0458ee55e3d9221a846098416625233 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Tue, 21 Feb 2017 22:34:55 +0100 Subject: [PATCH] Add a GetShareDir helper --- src/misc.cpp | 7 ++++++- src/misc.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/misc.cpp b/src/misc.cpp index 1713a76..ade9f44 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -86,6 +86,11 @@ std::string GetLocale () // Retourne le nom de dossier en cours. std::string GetBaseDir() +{ + return GetShareDir () + "planetblupi/"; +} + +std::string GetShareDir () { static std::string basePath; @@ -99,7 +104,7 @@ std::string GetBaseDir() SDL_free (sdlBasePath); } - return basePath + "share/planetblupi/"; + return basePath + "share/"; } // Ajoute le chemin permettant de lire un fichier diff --git a/src/misc.h b/src/misc.h index f5b2bd9..1b3bb1b 100644 --- a/src/misc.h +++ b/src/misc.h @@ -12,5 +12,6 @@ extern void InitRandom(); extern Sint32 Random (Sint32 min, Sint32 max); std::string GetBaseDir (); +std::string GetShareDir (); std::string GetLocale (); extern void AddUserPath (char *pFilename);