[PATCH 1/5] wined3d: Fix driver version check.

Józef Kucia jkucia at codeweavers.com
Tue Mar 22 07:41:46 CDT 2016


The previous check didn't catch older Windows versions for which
dwMinorVersion > 2.

Spotted by Michael Müller.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
This basically uses equivalent condition to the one in the patch
attached to bug 39878.

https://bugs.winehq.org/attachment.cgi?id=53597&action=diff
---
 dlls/wined3d/directx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index be3fdb0..f57f326 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1533,8 +1533,7 @@ static void init_driver_info(struct wined3d_driver_info *driver_info,
      * In order to avoid this application bug we limit the amount of video memory
      * to LONG_MAX for older Windows versions.
      */
-    if (os_version.dwMajorVersion <= 5 && os_version.dwMinorVersion <= 2
-            && driver_info->vram_bytes > LONG_MAX)
+    if (driver_model < DRIVER_MODEL_NT6X && driver_info->vram_bytes > LONG_MAX)
     {
         TRACE("Limiting amount of video memory to %#lx bytes for OS version older than Vista.\n", LONG_MAX);
         driver_info->vram_bytes = LONG_MAX;
-- 
2.4.10




More information about the wine-patches mailing list