1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add a GetShareDir helper

This commit is contained in:
Mathieu Schroeter 2017-02-21 22:34:55 +01:00
parent 6e3950ef1f
commit b77327aec0
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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);