mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-16 18:34:43 +02:00
Get full product name for debug info for Windows 11
Make it consistent with earlier version of Windows. Fix #12855, close #12856
This commit is contained in:
parent
e003f5b45f
commit
05977f6308
@ -252,10 +252,18 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
{
|
{
|
||||||
swprintf(szProductName, bufSize, TEXT("%s"), (NppParameters::getInstance()).getWinVersionStr().c_str());
|
swprintf(szProductName, bufSize, TEXT("%s"), (NppParameters::getInstance()).getWinVersionStr().c_str());
|
||||||
}
|
}
|
||||||
|
else if (NppDarkMode::isWindows11())
|
||||||
// Override ProductName if it's Windows 11
|
{
|
||||||
if (NppDarkMode::isWindows11())
|
generic_string tmpProductName = szProductName;
|
||||||
swprintf(szProductName, bufSize, TEXT("%s"), TEXT("Windows 11"));
|
constexpr size_t strLen = 10U;
|
||||||
|
const TCHAR strWin10[strLen + 1U] = TEXT("Windows 10");
|
||||||
|
const size_t pos = tmpProductName.find(strWin10);
|
||||||
|
if (pos < (bufSize - strLen - 1U))
|
||||||
|
{
|
||||||
|
tmpProductName.replace(pos, strLen, TEXT("Windows 11"));
|
||||||
|
swprintf(szProductName, bufSize, TEXT("%s"), tmpProductName.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (szCurrentBuildNumber[0] == '\0')
|
if (szCurrentBuildNumber[0] == '\0')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user