Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51815
Signed-off-by: Esme Povirk esme@codeweavers.com --- I took some liberties with the ARM environments. I haven't found an actual Windows machine with a 32-bit ARM print environment, but MS-RPRN implies that "Windows ARM" is a valid environment name.
My Windows 10 machine does have a "Windows ARM64" environment but it only has driver version 4 in the registry, not 3.
dlls/localspl/provider.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c index c17983e3037..aded4ed44c4 100644 --- a/dlls/localspl/provider.c +++ b/dlls/localspl/provider.c @@ -245,10 +245,28 @@ static const printenv_t env_x86 = {x86_envnameW, L"w32x86", 3, static const printenv_t env_x64 = {L"Windows x64", L"x64", 3, L"\Version-3", L"\3"};
+static const printenv_t env_arm = {L"Windows ARM", L"arm", 3, + L"\Version-3", L"\3"}; + +static const printenv_t env_arm64 = {L"Windows ARM64", L"arm64", 3, + L"\Version-3", L"\3"}; + static const printenv_t env_win40 = {L"Windows 4.0", L"win40", 0, L"\Version-0", L"\0"};
-static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_ia64, &env_win40}; +static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_ia64, &env_arm, &env_arm64, &env_win40}; + +#ifdef __i386__ +#define env_arch env_x86 +#elif defined __x86_64__ +#define env_arch env_x64 +#elif defined __arm__ +#define env_arch env_arm +#elif defined __aarch64__ +#define env_arch env_arm64 +#else +#error not defined for this cpu +#endif
static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W), @@ -916,7 +934,7 @@ static const printenv_t * validate_envW(LPCWSTR env) } else { - result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86; + result = (GetVersion() & 0x80000000) ? &env_win40 : &env_arch; }
TRACE("=> using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));