From 6add05d33b11f7d0e96778decdad8f3ddace83e3 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Sun, 30 Jul 2006 23:28:24 +0200 Subject: [PATCH] ddraw: Order Z-buffer formats by depth buffer bit depths in IDirect3DImpl_7_EnumZBufferFormats. --- dlls/ddraw/direct3d.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/direct3d.c b/dlls/ddraw/direct3d.c index 19c2e8c6740..db9fa7d717a 100644 --- a/dlls/ddraw/direct3d.c +++ b/dlls/ddraw/direct3d.c @@ -1053,13 +1053,15 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface, HRESULT hr; int i; + /* Order matters. Specifically, BattleZone II (full version) expects the + * 16-bit depth formats to be listed before the 24 and 32 ones. */ WINED3DFORMAT FormatList[] = { - WINED3DFMT_D32, WINED3DFMT_D15S1, - WINED3DFMT_D24S8, + WINED3DFMT_D16, WINED3DFMT_D24X8, WINED3DFMT_D24X4S4, - WINED3DFMT_D16 + WINED3DFMT_D24S8, + WINED3DFMT_D32 }; TRACE("(%p)->(%s,%p,%p): Relay\n", iface, debugstr_guid(refiidDevice), Callback, Context);