Module: wine Branch: master Commit: 80c9034976dee54a549b789e50cae071a0c1b7e5 URL: https://gitlab.winehq.org/wine/wine/-/commit/80c9034976dee54a549b789e50cae07...
Author: Alexandre Julliard julliard@winehq.org Date: Wed May 15 10:48:43 2024 +0200
wbemprox: Use RtlGetNativeSystemInformation directly to get the correct info on ARM platforms.
---
dlls/wbemprox/builtin.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 72ee294dd08..80434e5f19f 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -1725,10 +1725,16 @@ static WCHAR *get_computername(void)
static const WCHAR *get_systemtype(void) { - SYSTEM_INFO info; - GetNativeSystemInfo( &info ); - if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"x64 based PC"; - return L"x86 based PC"; + SYSTEM_CPU_INFORMATION info; + + RtlGetNativeSystemInformation( SystemCpuInformation, &info, sizeof(info), NULL ); + switch (info.ProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_ARM: return L"ARM-based PC"; + case PROCESSOR_ARCHITECTURE_ARM64: return L"ARM64-based PC"; + case PROCESSOR_ARCHITECTURE_AMD64: return L"x64-based PC"; + default: return L"x86-based PC"; + } }
static WCHAR *get_username(void) @@ -3416,10 +3422,17 @@ static WCHAR *get_processor_manufacturer( UINT index, const char *buf, UINT len } static const WCHAR *get_osarchitecture(void) { - SYSTEM_INFO info; - GetNativeSystemInfo( &info ); - if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"64-bit"; - return L"32-bit"; + SYSTEM_CPU_INFORMATION info; + + RtlGetNativeSystemInformation( SystemCpuInformation, &info, sizeof(info), NULL ); + switch (info.ProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_INTEL: + case PROCESSOR_ARCHITECTURE_ARM: + return L"32-bit"; + default: + return L"64-bit"; + } } static WCHAR *get_processor_caption( UINT index ) {