Skip to content

Commit e689242

Browse files
authored
Fix crash after #4119 (PR #4136)
1 parent 605e16d commit e689242

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Client/core/CCore.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,21 +1772,26 @@ void CCore::ApplyCoreInitSettings()
17721772
#if (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
17731773
const auto aware = CVARS_GET_VALUE<bool>("process_dpi_aware");
17741774

1775+
// The minimum supported client for the function below is Windows Vista (Longhorn).
1776+
// For more information, refer to the Microsoft Learn article:
1777+
// https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
17751778
if (aware)
17761779
SetProcessDPIAware();
17771780
#endif
17781781

17791782
const auto revision = GetApplicationSettingInt("reset-settings-revision");
17801783

1781-
if (revision >= 21486)
1782-
return;
1783-
1784-
const auto skin = CVARS_GET_VALUE<std::string>("current_skin");
1784+
// Users with the default skin will be switched to the 2023 version by replacing "Default" with "Default 2023".
1785+
// The "Default 2023" GUI skin was introduced in commit 2d9e03324b07e355031ecb3263477477f1a91399.
1786+
if (revision < 21486)
1787+
{
1788+
const auto skin = CVARS_GET_VALUE<std::string>("current_skin");
17851789

1786-
if (skin == "Default")
1787-
CVARS_SET("current_skin", "Default 2023");
1790+
if (skin == "Default")
1791+
CVARS_SET("current_skin", "Default 2023");
17881792

1789-
SetApplicationSettingInt("reset-settings-revision", 21486);
1793+
SetApplicationSettingInt("reset-settings-revision", 21486);
1794+
}
17901795

17911796
const auto process = GetCurrentProcess();
17921797
const int priorities[] = {NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, HIGH_PRIORITY_CLASS};

0 commit comments

Comments
 (0)