st/nine: Fix ATI2 pitch for non-square

Fixes crash for non-square textures.
We were using the height instead of the
width for some calculations.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Axel Davy 2015-08-23 01:09:44 +02:00
parent eeeab8d6b4
commit 35047681ff
1 changed files with 2 additions and 2 deletions

View File

@ -393,8 +393,8 @@ NineSurface9_LockRect( struct NineSurface9 *This,
* and bpp 8, and the app has a workaround to work with the fact
* that it is actually compressed. */
if (is_ATI1_ATI2(This->base.info.format)) {
pLockedRect->Pitch = This->desc.Height;
pLockedRect->pBits = This->data + box.y * This->desc.Height + box.x;
pLockedRect->Pitch = This->desc.Width;
pLockedRect->pBits = This->data + box.y * This->desc.Width + box.x;
} else {
pLockedRect->Pitch = This->stride;
pLockedRect->pBits = NineSurface9_GetSystemMemPointer(This,