Commit 1b8629b3 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Correct loop check for enum display and include 32bit modes in 24bit.

parent 84146684
......@@ -560,8 +560,9 @@ UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Adapter,
i++;
break;
case D3DFMT_X8R8G8B8:
case D3DFMT_A8R8G8B8:
case D3DFMT_A8R8G8B8:
if (min(DevModeW.dmBitsPerPel, bpp) == 32) i++;
if (min(DevModeW.dmBitsPerPel, bpp) == 24) i++;
break;
case D3DFMT_X1R5G5B5:
case D3DFMT_A1R5G5B5:
......@@ -616,9 +617,9 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, D3DF
int i = 0;
int j = 0;
DEVMODEW DevModeWtmp;
while ((Mode+1) < i && EnumDisplaySettingsExW(NULL, j, &DevModeWtmp, 0)) {
while (i<(Mode+1) && EnumDisplaySettingsExW(NULL, j, &DevModeWtmp, 0)) {
j++;
switch (Format)
{
......@@ -628,6 +629,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, D3DF
case D3DFMT_X8R8G8B8:
case D3DFMT_A8R8G8B8:
if (min(DevModeWtmp.dmBitsPerPel, bpp) == 32) i++;
if (min(DevModeWtmp.dmBitsPerPel, bpp) == 24) i++;
break;
case D3DFMT_X1R5G5B5:
case D3DFMT_A1R5G5B5:
......
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