diff options
author | aliaspider | 2014-10-28 05:42:01 +0100 |
---|---|---|
committer | aliaspider | 2014-10-28 05:42:01 +0100 |
commit | 9d034e0ae0f04082cb562a78c94a2a4edb12a6a5 (patch) | |
tree | 5a6b2e651027d19c79e2441bec2d872d2105b688 | |
parent | 76fef9625dd83399979a653b74f377f730725a70 (diff) | |
download | snes9x2005-9d034e0ae0f04082cb562a78c94a2a4edb12a6a5.tar.gz snes9x2005-9d034e0ae0f04082cb562a78c94a2a4edb12a6a5.tar.bz2 snes9x2005-9d034e0ae0f04082cb562a78c94a2a4edb12a6a5.zip |
ugly fix to solve segfaults on 64-bit platforms.
-rw-r--r-- | source/gfx.h | 2 | ||||
-rw-r--r-- | source/tile.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/gfx.h b/source/gfx.h index 37a082e..590db7c 100644 --- a/source/gfx.h +++ b/source/gfx.h @@ -137,7 +137,9 @@ struct SGFX{ uint32 PPL; // Number of pixels on each of Screen buffer uint32 PPLx2; uint32 PixSize; + uint8 S_safety_margin[8]; uint8 *S; + uint8 DB_safety_margin[8]; uint8 *DB; uint32 DepthDelta; uint8 Z1; // Depth for comparison diff --git a/source/tile.cpp b/source/tile.cpp index 87d1fac..f8c1400 100644 --- a/source/tile.cpp +++ b/source/tile.cpp @@ -456,11 +456,11 @@ void DrawLargePixelHalfWidth (uint32 Tile, uint32 Offset, } #endif -static void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16 (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; - uint16 *Screen = (uint16 *) GFX.S + Offset; - uint8 *Depth = GFX.DB + Offset; + uint16 *Screen = (uint16 *) GFX.S + Offset; + uint8 *Depth = GFX.DB + Offset; for (uint8 N = 0; N < 4; N++) { @@ -472,7 +472,7 @@ static void WRITE_4PIXELS16 (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) } } -static void WRITE_4PIXELS16_FLIPPED (uint32 Offset, uint8 *Pixels, uint16 *ScreenColors) +static void WRITE_4PIXELS16_FLIPPED (int32 Offset, uint8 *Pixels, uint16 *ScreenColors) { uint8 Pixel; uint16 *Screen = (uint16 *) GFX.S + Offset; |