Skip to content

Commit

Permalink
steam_helper: import upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Jun 6, 2024
1 parent 319e315 commit 420c1f1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions steam_helper/steam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ static void setup_steam_registry(void)
char buf[256];
HKEY key;
LSTATUS status;
const int system_locale_appids[] = {
1284210 /* Guild Wars 2 */
};

ui_lang = SteamUtils()->GetSteamUILanguage();
WINE_TRACE("UI language: %s\n", wine_dbgstr_a(ui_lang));
Expand All @@ -156,6 +159,18 @@ static void setup_steam_registry(void)
languages = SteamApps()->GetAvailableGameLanguages();
WINE_TRACE( "Game language %s, available %s\n", wine_dbgstr_a(language), wine_dbgstr_a(languages) );

if (strchr(languages, ',') == NULL) /* If there is a list of languages then respect that */
{
for (int i = 0; i < (sizeof(system_locale_appids) / sizeof(*system_locale_appids)); i++)
{
if (system_locale_appids[i] == appid)
{
WINE_TRACE("Not changing system locale for application %i\n",appid);
language = NULL;
}
}
}

if (!language) locale = NULL;
else if (!strcmp( language, "arabic" )) locale = "ar_001.UTF-8";
else if (!strcmp( language, "bulgarian" )) locale = "bg_BG.UTF-8";
Expand Down

0 comments on commit 420c1f1

Please sign in to comment.