diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 63bcd6224..64cd5a4fe 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.cxx,v 1.71 2006-01-10 20:37:00 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.72 2006-01-11 13:25:20 stephena Exp $ //============================================================================ #include @@ -46,10 +46,11 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FrameBuffer::FrameBuffer(OSystem* osystem) : myOSystem(osystem), - theRedrawTIAIndicator(true), + myScreen(0), theZoomLevel(2), theMaxZoomLevel(2), theAspectRatio(1.0), + theRedrawTIAIndicator(true), myUsePhosphor(false), myPhosphorBlend(77), myFrameRate(0), @@ -88,6 +89,10 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height, setWindowIcon(); } + // Erase contents of previous screen + if(myScreen) + SDL_FillRect(myScreen, NULL, 0); + // Query the desktop size // This is really the job of SDL myDesktopDim.w = myDesktopDim.h = 0; diff --git a/stella/src/emucore/FrameBuffer.hxx b/stella/src/emucore/FrameBuffer.hxx index 267d1aa9a..6cfb910e4 100644 --- a/stella/src/emucore/FrameBuffer.hxx +++ b/stella/src/emucore/FrameBuffer.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.hxx,v 1.62 2006-01-10 20:37:00 stephena Exp $ +// $Id: FrameBuffer.hxx,v 1.63 2006-01-11 13:25:20 stephena Exp $ //============================================================================ #ifndef FRAMEBUFFER_HXX @@ -51,7 +51,7 @@ enum FrameStyle { All GUI elements (ala ScummVM) are drawn here as well. @author Stephen Anthony - @version $Id: FrameBuffer.hxx,v 1.62 2006-01-10 20:37:00 stephena Exp $ + @version $Id: FrameBuffer.hxx,v 1.63 2006-01-11 13:25:20 stephena Exp $ */ class FrameBuffer { @@ -417,9 +417,6 @@ class FrameBuffer // Dimensions of the desktop area SDL_Rect myDesktopDim; - // Indicates if the TIA area should be redrawn - bool theRedrawTIAIndicator; - // The SDL video buffer SDL_Surface* myScreen; @@ -441,6 +438,9 @@ class FrameBuffer // The aspect ratio of the window float theAspectRatio; + // Indicates if the TIA area should be redrawn + bool theRedrawTIAIndicator; + // Use dirty updates (SDL_UpdateRects instead of SDL_UpdateRect) bool myUseDirtyRects;