Skip to content

Commit

Permalink
Win32: Update Validate_SetPreferredAppMode for Arm64 24H2
Browse files Browse the repository at this point in the history
  • Loading branch information
sratz committed Jan 26, 2025
1 parent 6d374d9 commit b4893c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 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 @@ -254,6 +254,16 @@ BOOL Validate_SetPreferredAppMode(const BYTE* functionPtr)
return arg0 == arg1;
}

/* Win11 builds from 26100 */
if (((*(const DWORD*)(&functionPtr[0x00])) & 0x9F00001F) == 0x90000008 && // adrp x8,#...
((*(const DWORD*)(&functionPtr[0x04])) & 0xFF8003FF) == 0x91000108 && // add x8,x8,#...
*(const DWORD*)(&functionPtr[0x08]) == 0x2A0003E9 && // mov w9,w0
*(const DWORD*)(&functionPtr[0x0c]) == 0xB9400100 && // ldr w0,[x8]
*(const DWORD*)(&functionPtr[0x10]) == 0xB8E98109) // swpal w9,w9,[x8]
{
return TRUE;
}

return FALSE;
#else
#error Unsupported processor type
Expand Down

0 comments on commit b4893c1

Please sign in to comment.