mirror of https://github.com/stella-emu/stella.git
Erase old contents of RGB buffer when toggling phosphor and Blargg
effects (fixes #175). Right idea, but I always forget that memset operates on bytes, but the RGB buffer contains uInt32 (so multiply by 4).
This commit is contained in:
parent
626ff450d9
commit
fbb73b72f1
|
@ -228,8 +228,10 @@ void TIASurface::enablePhosphor(bool enable, int blend)
|
|||
myUsePhosphor = enable;
|
||||
myPhosphorPercent = blend / 100.0;
|
||||
myFilter = Filter(enable ? uInt8(myFilter) | 0x01 : uInt8(myFilter) & 0x10);
|
||||
|
||||
myTiaSurface->setDirty();
|
||||
mySLineSurface->setDirty();
|
||||
memset(myRGBFramebuffer, 0, AtariNTSC::outWidth(kTIAW) * kTIAH * 4);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -278,8 +280,7 @@ void TIASurface::enableNTSC(bool enable)
|
|||
|
||||
myTiaSurface->setDirty();
|
||||
mySLineSurface->setDirty();
|
||||
|
||||
memset(myRGBFramebuffer, 0, AtariNTSC::outWidth(kTIAW) * kTIAH);
|
||||
memset(myRGBFramebuffer, 0, AtariNTSC::outWidth(kTIAW) * kTIAH * 4);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue