Commit 67436f9d authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Correctly name a variable.

parent 385a8da4
...@@ -1796,7 +1796,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ...@@ -1796,7 +1796,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
GLenum format, internal, type; GLenum format, internal, type;
CONVERT_TYPES convert; CONVERT_TYPES convert;
int bpp; int bpp;
int pitch; int width;
BYTE *mem; BYTE *mem;
if (This->Flags & SFLAG_INTEXTURE) { if (This->Flags & SFLAG_INTEXTURE) {
...@@ -1879,21 +1879,21 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ...@@ -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); 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) if (NP2_REPACK == wined3d_settings.nonpower2_mode || This->resource.usage & WINED3DUSAGE_RENDERTARGET)
pitch = This->currentDesc.Width; width = This->currentDesc.Width;
else else
pitch = This->pow2Width; width = This->pow2Width;
if((convert != NO_CONVERSION) && This->resource.allocatedMemory) { if((convert != NO_CONVERSION) && This->resource.allocatedMemory) {
int height = This->glRect.bottom - This->glRect.top; int height = This->glRect.bottom - This->glRect.top;
mem = HeapAlloc(GetProcessHeap(), 0, pitch * height * bpp); mem = HeapAlloc(GetProcessHeap(), 0, width * height * bpp);
if(!mem) { if(!mem) {
ERR("Out of memory %d, %d!\n", pitch, height); ERR("Out of memory %d, %d!\n", width, height);
return WINED3DERR_OUTOFVIDEOMEMORY; 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; This->Flags |= SFLAG_CONVERTED;
} else if (This->resource.format == WINED3DFMT_P8 && GL_SUPPORT(EXT_PALETTED_TEXTURE)) { } else if (This->resource.format == WINED3DFMT_P8 && GL_SUPPORT(EXT_PALETTED_TEXTURE)) {
...@@ -1906,7 +1906,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ...@@ -1906,7 +1906,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
} }
/* Make sure the correct pitch is used */ /* 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)) { if (NP2_REPACK == wined3d_settings.nonpower2_mode && (This->Flags & SFLAG_NONPOW2) && !(This->Flags & SFLAG_OVERSIZE)) {
TRACE("non power of two support\n"); TRACE("non power of two support\n");
......
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