steam-helper: Create list of games to ignore selected locale

First, and only on this list so far is Guild Wars 2 (1284210)

CW-Bug-Id: #23824
This commit is contained in:
Aric Stewart 2024-06-04 07:49:37 -05:00 committed by Arkadiusz Hiler
parent 962bbc4e74
commit 5a66da7ed4

View file

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