Fixed: Use language defined in Ryzom properties from Steam
This commit is contained in:
parent
29c946b73a
commit
45f2100a03
1 changed files with 7 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
// prototypes definitions for Steam API functions we'll call
|
||||
typedef bool (__cdecl *SteamAPI_InitFuncPtr)();
|
||||
typedef void (__cdecl *SteamAPI_ShutdownFuncPtr)();
|
||||
typedef ISteamApps* (__cdecl *SteamAppsFuncPtr)();
|
||||
typedef ISteamClient* (__cdecl *SteamClientFuncPtr)();
|
||||
typedef ISteamFriends* (__cdecl *SteamFriendsFuncPtr)();
|
||||
typedef ISteamUser* (__cdecl *SteamUserFuncPtr)();
|
||||
|
@ -45,6 +46,7 @@ if (nl##symbol == NULL) return false
|
|||
|
||||
NL_DECLARE_SYMBOL(SteamAPI_Init);
|
||||
NL_DECLARE_SYMBOL(SteamAPI_Shutdown);
|
||||
NL_DECLARE_SYMBOL(SteamApps);
|
||||
NL_DECLARE_SYMBOL(SteamClient);
|
||||
NL_DECLARE_SYMBOL(SteamFriends);
|
||||
NL_DECLARE_SYMBOL(SteamUser);
|
||||
|
@ -330,6 +332,7 @@ bool CSteamClient::init()
|
|||
_Initialized = true;
|
||||
|
||||
// load more Steam functions
|
||||
NL_LOAD_SYMBOL(SteamApps);
|
||||
NL_LOAD_SYMBOL(SteamClient);
|
||||
NL_LOAD_SYMBOL(SteamFriends);
|
||||
NL_LOAD_SYMBOL(SteamUser);
|
||||
|
@ -339,10 +342,14 @@ bool CSteamClient::init()
|
|||
nlSteamClient()->SetWarningMessageHook(SteamWarningMessageHook);
|
||||
|
||||
bool loggedOn = nlSteamUser()->BLoggedOn();
|
||||
const char *lang = nlSteamApps()->GetCurrentGameLanguage();
|
||||
|
||||
nlinfo("Steam AppID: %u", nlSteamUtils()->GetAppID());
|
||||
nlinfo("Steam login: %s", nlSteamFriends()->GetPersonaName());
|
||||
nlinfo("Steam user logged: %s", loggedOn ? "yes":"no");
|
||||
nlinfo("Steam language: %s", lang);
|
||||
|
||||
NLMISC::CI18N::setSystemLanguageCode(lang);
|
||||
|
||||
// don't need to continue, if not connected
|
||||
if (!loggedOn) return false;
|
||||
|
|
Loading…
Reference in a new issue