Return the adaptor mode as X8R8G8B8 when BPP is 24 or 32 bits.

This commit is contained in:
Oliver Stieber 2005-09-19 15:25:07 +00:00 committed by Alexandre Julliard
parent 87c347b18e
commit b7603859f3

View File

@ -811,7 +811,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE
pMode->Height = DevModeW.dmPelsHeight; pMode->Height = DevModeW.dmPelsHeight;
bpp = min(DevModeW.dmBitsPerPel, bpp); bpp = min(DevModeW.dmBitsPerPel, bpp);
pMode->RefreshRate = D3DADAPTER_DEFAULT; pMode->RefreshRate = D3DADAPTER_DEFAULT;
if (DevModeW.dmFields&DM_DISPLAYFREQUENCY) if (DevModeW.dmFields & DM_DISPLAYFREQUENCY)
{ {
pMode->RefreshRate = DevModeW.dmDisplayFrequency; pMode->RefreshRate = DevModeW.dmDisplayFrequency;
} }
@ -821,8 +821,8 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE
switch (bpp) { switch (bpp) {
case 8: pMode->Format = D3DFMT_R3G3B2; break; case 8: pMode->Format = D3DFMT_R3G3B2; break;
case 16: pMode->Format = D3DFMT_R5G6B5; break; case 16: pMode->Format = D3DFMT_R5G6B5; break;
case 24: /* pMode->Format = D3DFMT_R5G6B5; break;*/ /* Make 24bit appear as 32 bit */ case 24: /* Robots needs 24 and 32 bit as X8R8G8B8 to start */
case 32: pMode->Format = D3DFMT_A8R8G8B8; break; case 32: pMode->Format = D3DFMT_X8R8G8B8; break;
default: pMode->Format = D3DFMT_UNKNOWN; default: pMode->Format = D3DFMT_UNKNOWN;
} }
} else { } else {
@ -1113,7 +1113,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
if (hr != D3D_OK) if (hr != D3D_OK)
TRACE_(d3d_caps)("Failed to match stencil format to device\b"); TRACE_(d3d_caps)("Failed to match stencil format to device\b");
TRACE_(d3d_caps)("(%p) : Returning %d\n", This, hr); TRACE_(d3d_caps)("(%p) : Returning %lx\n", This, hr);
return hr; return hr;
} }