mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-03-28 14:56:24 +01:00
fix country in Steam_Apps::GetAppData()
This commit is contained in:
parent
0e0df256c5
commit
b9d50520e4
1 changed files with 3 additions and 3 deletions
|
@ -47,10 +47,10 @@ int Steam_Apps::GetAppData( AppId_t nAppID, const char *pchKey, char *pchValue,
|
|||
return 2;
|
||||
} else if (common_helpers::str_cmp_insensitive("country", pchKey)) {
|
||||
// TODO this is not exactly how real client does it, but close enough
|
||||
auto lang = GetCurrentGameLanguage();
|
||||
auto lang_lower = common_helpers::to_lower(lang && lang[0] ? lang : "--"); // "--" is an actual value the client returns
|
||||
auto country = settings->ip_country.c_str();
|
||||
auto country_lower = common_helpers::to_lower(country && country[0] ? country : "--"); // "--" is an actual value the client returns
|
||||
if (pchValue && cchValueMax >= 3) {
|
||||
strncpy(pchValue, lang_lower.c_str(), 3);
|
||||
strncpy(pchValue, country_lower.c_str(), 3);
|
||||
pchValue[2] = 0;
|
||||
}
|
||||
return 3;
|
||||
|
|
Loading…
Add table
Reference in a new issue