GB GPU Viewer: Bounds check tile drawing for OBJ window, seems to resolve random crashing
This commit is contained in:
parent
c0b6bf61b1
commit
e65e77e7cd
|
@ -375,11 +375,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (cgb && flags.Bit(3))
|
if (cgb && flags.Bit(3))
|
||||||
tile += 8192;
|
tile += 8192;
|
||||||
|
|
||||||
DrawTileHv(tile, dest, pitch, thisPal, hFlip, vFlip);
|
// only draw tiles that are completely in bounds so to avoid out of bounds accesses
|
||||||
|
if ((xPos <= 248) && (yPos <= 240))
|
||||||
if (tall)
|
|
||||||
{
|
{
|
||||||
DrawTileHv(tile + 16, dest + pitch * 8, pitch, thisPal, hFlip, vFlip);
|
DrawTileHv(tile, dest, pitch, thisPal, hFlip, vFlip);
|
||||||
|
|
||||||
|
if (tall)
|
||||||
|
{
|
||||||
|
DrawTileHv(tile + 16, dest + pitch * 8, pitch, thisPal, hFlip, vFlip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dest -= xPos + yPos * pitch;
|
dest -= xPos + yPos * pitch;
|
||||||
|
|
Loading…
Reference in New Issue