Module: wine Branch: master Commit: 67d4be0347f39e5c6b8536dcaa91b405ed359b81 URL: http://source.winehq.org/git/wine.git/?a=commit;h=67d4be0347f39e5c6b8536dcaa...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jan 18 21:46:20 2012 +0100
ddraw: Just pin all version 1 surfaces.
---
dlls/ddraw/surface.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 60f29dc..595d141 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5474,15 +5474,16 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; }
+ /* Some applications assume surfaces will always be mapped at the same + * address. Some of those also assume that this address is valid even when + * the surface isn't mapped, and that updates done this way will be + * visible on the screen. The game Nox is such an application, + * Commandos: Behind Enemy Lines is another. */ + if (version == 1) + flags |= WINED3D_SURFACE_PIN_SYSMEM; + if (desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { - /* Some applications assume that the primary surface will always be - * mapped at the same address. Some of those also assume that this - * address is valid even when the surface isn't mapped, and that - * updates done this way will be visible on the screen. The game Nox - * is such an application. */ - if (version == 1) - flags |= WINED3D_SURFACE_PIN_SYSMEM; usage |= WINED3DUSAGE_RENDERTARGET; desc->ddsCaps.dwCaps |= DDSCAPS_VISIBLE; }