From 1e8675281271ae6f6eb1bafa789be91919a8b6da Mon Sep 17 00:00:00 2001 From: Ivan Gyurdiev Date: Fri, 21 Apr 2006 04:21:47 -0400 Subject: [PATCH] wined3d: Fix mipmap level count. --- dlls/wined3d/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 12d759be210..e337b8d6025 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -811,7 +811,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid object->baseTexture.levels++; tmpW = Width; tmpH = Height; - while (tmpW > 1 && tmpH > 1) { + while (tmpW > 1 || tmpH > 1) { tmpW = max(1, tmpW >> 1); tmpH = max(1, tmpH >> 1); object->baseTexture.levels++; @@ -889,7 +889,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, tmpW = Width; tmpH = Height; tmpD = Depth; - while (tmpW > 1 && tmpH > 1 && tmpD > 1) { + while (tmpW > 1 || tmpH > 1 || tmpD > 1) { tmpW = max(1, tmpW >> 1); tmpH = max(1, tmpH >> 1); tmpD = max(1, tmpD >> 1);