Skip to content

Commit affce53

Browse files
committed
Win32: Update Validate_SetPreferredAppMode for Arm64 24H2
Fixes #1763.
1 parent 6d374d9 commit affce53

File tree

1 file changed

+10
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT PI/win32/library

1 file changed

+10
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c

+10
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,16 @@ BOOL Validate_SetPreferredAppMode(const BYTE* functionPtr)
254254
return arg0 == arg1;
255255
}
256256

257+
/* Win11 builds from 26100 */
258+
if (((*(const DWORD*)(&functionPtr[0x00])) & 0x9F00001F) == 0x90000008 && // adrp x8,#...
259+
((*(const DWORD*)(&functionPtr[0x04])) & 0xFF8003FF) == 0x91000108 && // add x8,x8,#...
260+
*(const DWORD*)(&functionPtr[0x08]) == 0x2A0003E9 && // mov w9,w0
261+
*(const DWORD*)(&functionPtr[0x0c]) == 0xB9400100 && // ldr w0,[x8]
262+
*(const DWORD*)(&functionPtr[0x10]) == 0xB8E98109) // swpal w9,w9,[x8]
263+
{
264+
return TRUE;
265+
}
266+
257267
return FALSE;
258268
#else
259269
#error Unsupported processor type

0 commit comments

Comments
 (0)