mirror of https://github.com/snes9xgit/snes9x.git
Fix crash when drawing crosshair on screen edges (remove old workaround)
This commit is contained in:
parent
2c3230a8da
commit
c188725ee4
8
gfx.cpp
8
gfx.cpp
|
@ -2242,12 +2242,7 @@ void S9xDrawCrosshair (const char *crosshair, uint8 fgcolor, uint8 bgcolor, int1
|
||||||
fg = get_crosshair_color(fgcolor);
|
fg = get_crosshair_color(fgcolor);
|
||||||
bg = get_crosshair_color(bgcolor);
|
bg = get_crosshair_color(bgcolor);
|
||||||
|
|
||||||
// XXX: FIXME: why does it crash without this on Linux port? There are no out-of-bound writes without it...
|
uint16 *s = GFX.Screen + y * (int32)GFX.RealPPL + x;
|
||||||
#if (defined(__unix) || defined(__linux) || defined(__sun) || defined(__DJGPP))
|
|
||||||
if (x >= 0 && y >= 0)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
uint16 *s = GFX.Screen + y * GFX.RealPPL + x;
|
|
||||||
|
|
||||||
for (r = 0; r < 15 * rx; r++, s += GFX.RealPPL - 15 * cx)
|
for (r = 0; r < 15 * rx; r++, s += GFX.RealPPL - 15 * cx)
|
||||||
{
|
{
|
||||||
|
@ -2281,7 +2276,6 @@ void S9xDrawCrosshair (const char *crosshair, uint8 fgcolor, uint8 bgcolor, int1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GFX_MULTI_FORMAT
|
#ifdef GFX_MULTI_FORMAT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue