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

Extend IsRightReading for detecting fallback cases

This commit is contained in:
Mathieu Schroeter 2019-02-09 22:34:22 +01:00
parent 9b9b1e558e
commit e60568bdcf
2 changed files with 8 additions and 3 deletions

View File

@ -99,9 +99,14 @@ GetLocale ()
}
bool
IsRightReading ()
IsRightReading (const char * text)
{
return GetLocale () == "he";
auto isRight = false;
if (text)
isRight = strchr (text, 0xD7) != nullptr;
else
isRight = GetLocale () == "he";
return isRight;
}
// Retourne le nom de dossier en cours.

View File

@ -40,7 +40,7 @@ std::string GetBaseDir ();
std::string GetShareDir ();
std::string GetBinDir ();
std::string GetLocale ();
bool IsRightReading ();
bool IsRightReading (const char * text = nullptr);
extern void AddUserPath (std::string & pFilename);
enum Location { LOCATION_ABSOLUTE, LOCATION_BASE, LOCATION_USER };