Octavian Voicu octavian.voicu@gmail.com writes:
Fixes a bug that causes a stencil buffer leak in the game The Longest Journey. Problem can be seen in the console output log attached to bug #11819. This patch doesn't fix the original bug, but now game exits cleanly.
The root of the problem is that when releasing a surface, its attached surfaces are detached using IDirectDraw7_DeleteAttachedSurface, regardless of what interface was originally attached.
It doesn't work here:
../../../tools/runtest -q -P wine -M ddraw.dll -T ../../.. -p ddraw_test.exe.so dsurface.c && touch dsurface.ok dsurface.c:1603: Test failed: DeleteAttachedSurface returned 887601cc dsurface.c:3534: Tests skipped: IDirectDraw7_CreateSurface failed, hr = 0x88760091, format D3DFMT_X8B8G8R8 dsurface.c:3534: Tests skipped: IDirectDraw7_CreateSurface failed, hr = 0x88760091, format D3DFMT_X8B8G8R8 dsurface.c:3534: Tests skipped: IDirectDraw7_CreateSurface failed, hr = 0x88760091, format D3DFMT_A2R10G10B10 dsurface.c:3534: Tests skipped: IDirectDraw7_CreateSurface failed, hr = 0x88760091, format D3DFMT_A8L8 make[1]: *** [dsurface.ok] Error 1