From db519effe68daf9767dfc9c18ea01274c22b3e9c Mon Sep 17 00:00:00 2001 From: Sebastian Ratz Date: Mon, 21 Oct 2024 12:52:26 +0100 Subject: [PATCH] Win32: Update search for AllowDarkModeForWindowWithTelemetryId for 24H2 Fixes #1546 --- .../Eclipse SWT PI/win32/library/os_custom.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c index e12f97c3335..e56d7280f36 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c @@ -135,6 +135,13 @@ BOOL Validate_AllowDarkModeForWindowWithTelemetryId(const BYTE* functionPtr) return TRUE; } + /* Win11 builds from 26100 */ + if ((functionPtr[0x16] == 0xBE) && // mov edi, + (*(const DWORD*)(functionPtr + 0x17) == 0xA91E)) // 0A91Eh + { + return TRUE; + } + return FALSE; #elif defined(_M_ARM64) if (*(const DWORD*)(&functionPtr[0x18]) == 0xD29523C1) // mov x1,#0xA91E