Skip to content
Commit 4a55c527 authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Philip Zander
Browse files

gdk/win32: Consolidate CPU detection in one place

This consolidates the check for the running CPU in one single location,
to make things a bit cleaner, as:

* We can make use of IsWow64Process2(), if available, to check both
  whether we are running on an ARM64 CPU, and whether we are running as
  a WOW64 process.  This is also the function to use to properly check
  whether we are running as a WOW64 process on ARM64 systems, as
  IsWow64Process() does not work as we want on ARM64 systems.

* If we don't have IsWow64Process2() (which is absent from Windows prior
  to Windows 10 1511, where ARM64 Windows is introduced), we can fall
  back to  IsWow64Process(), which will tell us whether we are running
  as an WOW64 process (but clearly not on an ARM64 system).

Also clean up things a bit so that we can reduce reliance on global
variables.
parent aa3e6bb0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment