From 67436f9dbd6a0f987d35a0ff987f2cc257a870a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 5 Oct 2006 20:04:07 +0200 Subject: [PATCH] wined3d: Correctly name a variable. --- dlls/wined3d/surface.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a752665315f..19bbd98cb41 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1796,7 +1796,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { GLenum format, internal, type; CONVERT_TYPES convert; int bpp; - int pitch; + int width; BYTE *mem; if (This->Flags & SFLAG_INTEXTURE) { @@ -1879,21 +1879,21 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp); - /* The pitch is in 'length' not in bytes */ + /* The width is in 'length' not in bytes */ if (NP2_REPACK == wined3d_settings.nonpower2_mode || This->resource.usage & WINED3DUSAGE_RENDERTARGET) - pitch = This->currentDesc.Width; + width = This->currentDesc.Width; else - pitch = This->pow2Width; + width = This->pow2Width; if((convert != NO_CONVERSION) && This->resource.allocatedMemory) { int height = This->glRect.bottom - This->glRect.top; - mem = HeapAlloc(GetProcessHeap(), 0, pitch * height * bpp); + mem = HeapAlloc(GetProcessHeap(), 0, width * height * bpp); if(!mem) { - ERR("Out of memory %d, %d!\n", pitch, height); + ERR("Out of memory %d, %d!\n", width, height); return WINED3DERR_OUTOFVIDEOMEMORY; } - d3dfmt_convert_surface(This->resource.allocatedMemory, mem, pitch * height, convert, This); + d3dfmt_convert_surface(This->resource.allocatedMemory, mem, width * height, convert, This); This->Flags |= SFLAG_CONVERTED; } else if (This->resource.format == WINED3DFMT_P8 && GL_SUPPORT(EXT_PALETTED_TEXTURE)) { @@ -1906,7 +1906,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { } /* Make sure the correct pitch is used */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch); + glPixelStorei(GL_UNPACK_ROW_LENGTH, width); if (NP2_REPACK == wined3d_settings.nonpower2_mode && (This->Flags & SFLAG_NONPOW2) && !(This->Flags & SFLAG_OVERSIZE)) { TRACE("non power of two support\n");