diff --git a/stella/src/common/Snapshot.cxx b/stella/src/common/Snapshot.cxx index e20a51052..618c46de3 100644 --- a/stella/src/common/Snapshot.cxx +++ b/stella/src/common/Snapshot.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: Snapshot.cxx,v 1.9 2005-09-06 22:25:40 stephena Exp $ +// $Id: Snapshot.cxx,v 1.10 2006-05-24 17:37:32 stephena Exp $ //============================================================================ #ifdef SNAPSHOT_SUPPORT @@ -30,6 +30,8 @@ Snapshot::Snapshot(FrameBuffer& framebuffer) : myFrameBuffer(framebuffer) { + // Make sure we have a 'clean' image, with no onscreen messages + myFrameBuffer.hideMessage(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -74,12 +76,6 @@ string Snapshot::savePNG(string filename) uInt32 width = myFrameBuffer.imageWidth(); uInt32 height = myFrameBuffer.imageHeight(); - // TODO - this should really call something like OSystem::message() - // so we can get rid of annoying ifdefs everywhere -#ifdef PSP - fprintf(stdout,"ok w=%i h=%i\n",width,height); -#endif - ofstream* out = new ofstream(filename.c_str(), ios_base::binary); if(!out) return "Couldn't create snapshot file"; diff --git a/stella/src/emucore/EventHandler.cxx b/stella/src/emucore/EventHandler.cxx index c51885fad..7a4ff707d 100644 --- a/stella/src/emucore/EventHandler.cxx +++ b/stella/src/emucore/EventHandler.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: EventHandler.cxx,v 1.163 2006-05-15 12:24:09 stephena Exp $ +// $Id: EventHandler.cxx,v 1.164 2006-05-24 17:37:33 stephena Exp $ //============================================================================ #include @@ -2108,10 +2108,6 @@ void EventHandler::loadState(int state) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void EventHandler::takeSnapshot() { -#ifdef PSP_DEBUG - fprintf(stdout,"EventHandler::takeSnapshot\n"); -#endif - #ifdef SNAPSHOT_SUPPORT // Figure out the correct snapshot name string filename; @@ -2140,9 +2136,6 @@ void EventHandler::takeSnapshot() { buf.str(""); buf << sspath << "_" << i << ".png"; -#ifdef PSP_DEBUG - fprintf(stdout,"EventHandler::takeSnapshot '%s'\n",buf.str().c_str()); -#endif if(!FilesystemNode::fileExists(buf.str())) break; } @@ -2153,7 +2146,6 @@ void EventHandler::takeSnapshot() filename = sspath + ".png"; // Now create a Snapshot object and save the PNG - refreshDisplay(true); // force an immediate update Snapshot snapshot(myOSystem->frameBuffer()); string result = snapshot.savePNG(filename); myOSystem->frameBuffer().showMessage(result); diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 21ae33e00..5bc33c631 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.88 2006-05-15 16:21:27 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.89 2006-05-24 17:37:33 stephena Exp $ //============================================================================ #include @@ -287,7 +287,10 @@ void FrameBuffer::hideMessage() { // Erase old messages on the screen if(myMessage.counter > 0) - myOSystem->eventHandler().refreshDisplay(); + { + myMessage.counter = 0; + myOSystem->eventHandler().refreshDisplay(true); + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -325,7 +328,6 @@ void FrameBuffer::pause(bool status) void FrameBuffer::refresh() { theRedrawTIAIndicator = true; - myMessage.counter = 0; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -