Fix Debug information wrong OS information detected with windows 11 issue

Fix #11011
This commit is contained in:
Don Ho 2022-01-11 02:05:38 +01:00
parent 68d339d224
commit 5dada11848
2 changed files with 6 additions and 1 deletions

View File

@ -231,6 +231,11 @@ INT_PTR CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /
{
generic_sprintf(szProductName, TEXT("%s"), (NppParameters::getInstance()).getWinVersionStr().c_str());
}
// Override ProductName if it's Windows 11
if (NppDarkMode::isWindows11())
generic_sprintf(szProductName, TEXT("%s"), TEXT("Windows 11"));
if (szCurrentBuildNumber[0] == '\0')
{
DWORD dwVersion = GetVersion();