Skip to content

Commit 4084deb

Browse files
Synchronize changes from 1.6 branch [ci skip]
a4287a7 Addendum to 1755fd9
2 parents 540815f + a4287a7 commit 4084deb

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

Client/core/DXHook/CProxyDirect3D9.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -338,20 +338,7 @@ HRESULT CProxyDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND
338338
#endif
339339

340340
// Set dark titlebar if needed
341-
int themeStatus = 0;
342-
const SString appsUseLightTheme =
343-
GetSystemRegistryValue((uint)HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme", &themeStatus);
344-
BOOL darkTitleBar = FALSE;
345-
if (themeStatus > 0)
346-
{
347-
// Parse the registry value into a numeric flag
348-
char* themeEnd = nullptr;
349-
const long themeNumeric = strtol(appsUseLightTheme.c_str(), &themeEnd, 10);
350-
if (themeEnd != appsUseLightTheme.c_str() && *themeEnd == '\0')
351-
{
352-
darkTitleBar = (themeNumeric == 0);
353-
}
354-
}
341+
BOOL darkTitleBar = GetSystemRegistryValue((uint)HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme") == "\x0";
355342
DwmSetWindowAttribute(hFocusWindow, DWMWA_USE_IMMERSIVE_DARK_MODE, &darkTitleBar, sizeof(darkTitleBar));
356343

357344
// Update icon

0 commit comments

Comments
 (0)