localspl: Choose print environment based on architecture.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51815 Signed-off-by: Esme Povirk <esme@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0d05b01ce4
commit
6e14766ad5
|
@ -256,6 +256,18 @@ static const printenv_t env_win40 = {L"Windows 4.0", L"win40", 0,
|
|||
|
||||
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),
|
||||
sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W),
|
||||
|
@ -922,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));
|
||||
|
|
|
@ -320,6 +320,18 @@ static const printenv_t env_win40 = {envname_win40W, subdir_win40W, 0, Version0_
|
|||
|
||||
static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &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
|
||||
|
||||
/******************************************************************
|
||||
* validate the user-supplied printing-environment [internal]
|
||||
*
|
||||
|
@ -361,7 +373,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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue