Ivan Gyurdiev : wined3d: Fix mipmap level count.
Module: wine Branch: refs/heads/master Commit: 1e8675281271ae6f6eb1bafa789be91919a8b6da URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=1e8675281271ae6f6eb1bafa... Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Fri Apr 21 04:21:47 2006 -0400 wined3d: Fix mipmap level count. --- dlls/wined3d/device.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 12d759b..e337b8d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -811,7 +811,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_Creat 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_Create 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);
participants (1)
-
Alexandre Julliard