=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Limit amount of video memory for older Windows versions.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 14 09:05:20 CDT 2016
Module: wine
Branch: master
Commit: 565a5715468fa990cf9e7cbfe38ac59ddcde1e76
URL: http://source.winehq.org/git/wine.git/?a=commit;h=565a5715468fa990cf9e7cbfe38ac59ddcde1e76
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Mar 11 13:28:03 2016 +0100
wined3d: Limit amount of video memory for older Windows versions.
This should affect only 32-bit applications when the emulated Windows
version is set to "Windows 2003" or older.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/directx.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 60fb5ac..1aea568 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1510,6 +1510,18 @@ static void init_driver_info(struct wined3d_driver_info *driver_info,
driver = DRIVER_UNKNOWN;
}
+ /**
+ * Diablo 2 crashes when the amount of video memory is greater than 0x7fffffff.
+ * 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)
+ {
+ TRACE("Limiting amount of video memory to %#lx bytes for OS version older than Vista.\n", LONG_MAX);
+ driver_info->vram_bytes = LONG_MAX;
+ }
+
if (wined3d_settings.emulated_textureram)
{
TRACE("Overriding amount of video memory with 0x%s bytes.\n",
More information about the wine-cvs
mailing list