Fixed infrequent segfault in CheckAlpha

pixelData was allocated with stride shorts per row and then advanced as
stride ints per row (reading every other row).  Upshot: fully solid
16-bit textures with alpha channels should now properly categorize as
ALPHA_FULL
This commit is contained in:
Bovine 2014-02-02 13:51:45 -07:00
parent 35f72df8a8
commit 2c0df8db79

View file

@ -1465,7 +1465,7 @@ void TextureCache::CheckAlpha(TexCacheEntry &entry, u32 *pixelData, GLenum dstFm
break;
}
}
p += stride;
p += stride/2;
}
}
break;
@ -1477,7 +1477,7 @@ void TextureCache::CheckAlpha(TexCacheEntry &entry, u32 *pixelData, GLenum dstFm
u32 a = p[i] & 0x00010001;
hitZeroAlpha |= a ^ 0x00010001;
}
p += stride;
p += stride/2;
}
}
break;