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.
This commit is contained in:
committed by
Philip Zander
parent
aa3e6bb0a3
commit
4a55c527d7
@ -124,7 +124,6 @@ struct _GdkWin32Display
|
||||
GdkWin32User32DPIFuncs user32_dpi_funcs;
|
||||
|
||||
/* Running CPU items */
|
||||
GdkWin32KernelCPUFuncs cpu_funcs;
|
||||
};
|
||||
|
||||
struct _GdkWin32DisplayClass
|
||||
|
||||
Reference in New Issue
Block a user