Skip to content

Commit 944d790

Browse files
Replace paths to search OS locale
1 parent 7379721 commit 944d790

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/Registry.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,15 @@ string Registry::ToString(Games game)
7474

7575
QString Registry::ToQString(Games game) { return QString::fromStdString(Registry::ToString(game)); }
7676

77-
bool Registry::IsWindow64bit()
78-
{
79-
return GetWindowsBit() == WindowsBit::Win64;
80-
}
81-
82-
bool Registry::IsWindow32bit()
83-
{
84-
return GetWindowsBit() == WindowsBit::Win32;
85-
}
77+
bool Registry::IsWindow64bit() { return GetWindowsBit() == WindowsBit::Win64; }
78+
bool Registry::IsWindow32bit() { return GetWindowsBit() == WindowsBit::Win32; }
8679

8780
#pragma region Logger methods
8881
string Registry::GetCurrentUserLanguage()
8982
{
90-
const char Path[] = {"Control Panel\\International\\Geo"};
91-
const char Key[] = {"Name"};
92-
return GetTextFromKey(Registry::RootFolder::HKCU, &Path[0], &Key[0]);
83+
const char Path[] = {"Control Panel\\International"};
84+
const char Key[] = {"LocaleName"};
85+
return GetTextFromKey(Registry::RootFolder::HKCU, &Path[0], &Key[0]).substr(0, 2);
9386
}
9487

9588
string Registry::GetWindowsVersion()

0 commit comments

Comments
 (0)