mirror of https://github.com/stella-emu/stella.git
Clear TIA image when chaning scanline count.
This commit is contained in:
parent
c4e7088b0e
commit
fb2874732d
|
@ -219,9 +219,15 @@ void TIASurface::enableNTSC(bool enable)
|
|||
{
|
||||
myFilter = Filter(enable ? uInt8(myFilter) | 0x10 : uInt8(myFilter) & 0x01);
|
||||
|
||||
// Normal vs NTSC mode uses different source widths
|
||||
myTiaSurface->setSrcSize(enable ? AtariNTSC::outWidth(TIAConstants::frameBufferWidth)
|
||||
: TIAConstants::frameBufferWidth, myTIA->height());
|
||||
uInt32 surfaceWidth = enable ?
|
||||
AtariNTSC::outWidth(TIAConstants::frameBufferWidth) : TIAConstants::frameBufferWidth;
|
||||
|
||||
if (surfaceWidth != myTiaSurface->srcRect().w() || myTIA->height() != myTiaSurface->srcRect().h()) {
|
||||
myTiaSurface->setSrcSize(surfaceWidth, myTIA->height());
|
||||
|
||||
myTiaSurface->invalidate();
|
||||
myTIA->clearFrameBuffer();
|
||||
}
|
||||
|
||||
mySLineSurface->setSrcSize(1, 2 * myTIA->height());
|
||||
|
||||
|
|
|
@ -899,6 +899,13 @@ void TIA::renderToFrameBuffer()
|
|||
myFrameBufferScanlines = myFrontBufferScanlines;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::clearFrameBuffer()
|
||||
{
|
||||
myFramebuffer.fill(0);
|
||||
myFrontBuffer.fill(0);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TIA::update(uInt64 maxCycles)
|
||||
{
|
||||
|
|
|
@ -244,6 +244,8 @@ class TIA : public Device
|
|||
*/
|
||||
uInt8* frameBuffer() { return myFramebuffer.data(); }
|
||||
|
||||
void clearFrameBuffer();
|
||||
|
||||
/**
|
||||
Answers dimensional info about the framebuffer.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue