Skip to content

Commit 5ea724a

Browse files
committed
merge
2 parents 506815a + 2eb679d commit 5ea724a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

DWMBlurGlass/winmain.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
4040
return 0;
4141
#endif
4242

43+
auto [locale, parentLocale] = MDWMBlurGlass::GetSystemLocaleAndParent();
44+
4345
if (!MDWMBlurGlass::LoadLanguageFileList()
44-
|| (!MDWMBlurGlass::LoadBaseLanguageString(MDWMBlurGlass::GetSystemLocalName())
46+
|| (!MDWMBlurGlass::LoadBaseLanguageString(locale) && !MDWMBlurGlass::LoadBaseLanguageString(parentLocale)
4547
&& !MDWMBlurGlass::LoadBaseLanguageString(L"en-US")))
4648
{
4749
MessageBoxW(nullptr, L"初始化失败: 没有有效的语言文件 (Initialization failed: No valid language file).", L"error", MB_ICONERROR);
@@ -58,7 +60,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
5860
{
5961
MessageBoxW(nullptr,
6062
Helper::M_ReplaceString(MDWMBlurGlass::GetBaseLanguageString(L"initfail0"), L"{path}", curpath).c_str(),
61-
L"waring", MB_ICONWARNING | MB_TOPMOST);
63+
L"Warning", MB_ICONWARNING | MB_TOPMOST);
6264
return false;
6365
}
6466
}
@@ -129,4 +131,4 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
129131
engine.UnInitEngine();
130132

131133
return 0;
132-
}
134+
}

0 commit comments

Comments
 (0)