Commit 565a5715 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 630f5e97
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment