mirror of https://github.com/mgba-emu/mgba.git
GB: Fix boundary condition at end of scanline rendering
This commit is contained in:
parent
bdf647db42
commit
c06edae71d
|
@ -133,7 +133,7 @@ static void GBVideoSoftwareRendererDrawRange(struct GBVideoRenderer* renderer, i
|
||||||
}
|
}
|
||||||
color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y];
|
color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y];
|
||||||
int x;
|
int x;
|
||||||
for (x = startX; x < (endX & ~7); x += 8) {
|
for (x = startX; x + 7 < (endX & ~7); x += 8) {
|
||||||
row[x] = softwareRenderer->palette[softwareRenderer->row[x] & 0x7F];
|
row[x] = softwareRenderer->palette[softwareRenderer->row[x] & 0x7F];
|
||||||
row[x + 1] = softwareRenderer->palette[softwareRenderer->row[x + 1] & 0x7F];
|
row[x + 1] = softwareRenderer->palette[softwareRenderer->row[x + 1] & 0x7F];
|
||||||
row[x + 2] = softwareRenderer->palette[softwareRenderer->row[x + 2] & 0x7F];
|
row[x + 2] = softwareRenderer->palette[softwareRenderer->row[x + 2] & 0x7F];
|
||||||
|
|
Loading…
Reference in New Issue