[PATCH] localspl+winspool.drv: Use a better default environment for printers
Detlef Riekenberg
wine.dev at web.de
Wed Oct 19 16:27:41 CDT 2016
ALPHA and MIPS are unrelevant history, but arm and arm64 are still missing.
Who can send me a PI 3 for testing?
Or a tablet with Windows RT?
--
bye bye ... Detlef
Signed-off-by: Detlef Riekenberg <wine.dev at web.de>
---
dlls/localspl/provider.c | 7 +++++++
dlls/winspool.drv/info.c | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index b5fcdb1..3ee8d57 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -708,7 +708,14 @@ static const printenv_t * validate_envW(LPCWSTR env)
}
else
{
+#ifdef __x86_64__
+ result = &env_x64;
+#elif defined (__i386__)
result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86;
+#else
+ ERR("Default env not defined. Fallback to x86\n");
+ result = &env_x86;
+#endif
}
TRACE("=> using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 2f0ff3d..442f80a 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -349,8 +349,16 @@ static const printenv_t * validate_envW(LPCWSTR env)
}
else
{
+#ifdef __x86_64__
+ result = &env_x64;
+#elif defined (__i386__)
result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86;
+#else
+ ERR("Default env not defined. Fallback to x86\n");
+ result = &env_x86;
+#endif
}
+
TRACE("using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));
return result;
--
2.7.4
More information about the wine-patches
mailing list