Skip to content

Commit

Permalink
Backport Fix to 4_23 maintenance branch #1546 Win32: Update search fo…
Browse files Browse the repository at this point in the history
…r AllowDarkModeForWindowWithTelemetryId for 24H2

Fixes #1546
  • Loading branch information
sratz authored and elsazac committed Jan 15, 2025
1 parent 56ae2f2 commit dc05494
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,27 @@ BOOL Validate_AllowDarkModeForWindowWithTelemetryId(const BYTE* functionPtr)
return TRUE;
}

/* Win11 builds from 22621 */
if ((functionPtr[0x15] == 0xBA) && // mov edx,
(*(const DWORD*)(functionPtr + 0x16) == 0xA91E)) // 0A91Eh
{
return TRUE;
}

/* Win11 builds from 26100 */
if ((functionPtr[0x16] == 0xBE) && // mov esi,
(*(const DWORD*)(functionPtr + 0x17) == 0xA91E)) // 0A91Eh
{
return TRUE;
}

return FALSE;
#elif defined(_M_ARM64)
if (*(const DWORD*)(&functionPtr[0x18]) == 0xD29523C1) // mov x1,#0xA91E
{
return TRUE;
}

return FALSE;
#else
#error Unsupported processor type
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.swt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt; singleton:=true
Bundle-Version: 3.119.200.qualifier
Bundle-Version: 3.119.201.qualifier
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
DynamicImport-Package: org.eclipse.swt.accessibility2
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.swt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</parent>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt</artifactId>
<version>3.119.200-SNAPSHOT</version>
<version>3.119.201-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<properties>
Expand Down

0 comments on commit dc05494

Please sign in to comment.