Skip to content

Win32: Update Validate_SetPreferredAppMode for Arm64 24H2 #1765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading