diff --git a/stella/src/debugger/DebuggerParser.cxx b/stella/src/debugger/DebuggerParser.cxx index 8227347c7..44094a9b8 100644 --- a/stella/src/debugger/DebuggerParser.cxx +++ b/stella/src/debugger/DebuggerParser.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: DebuggerParser.cxx,v 1.103 2008-03-23 17:43:21 stephena Exp $ +// $Id: DebuggerParser.cxx,v 1.104 2008-04-02 21:22:16 stephena Exp $ //============================================================================ #include @@ -974,16 +974,19 @@ void DebuggerParser::executeList() // "listbreaks" void DebuggerParser::executeListbreaks() { - char buf[255]; + ostringstream buf; int count = 0; - for(unsigned int i=0; i<0x10000; i++) { - if(debugger->breakpoints().isSet(i)) { - sprintf(buf, "%s ", debugger->equates().getFormatted(i, 4)); - commandResult += buf; - if(! (++count % 8) ) commandResult += "\n"; + for(unsigned int i = 0; i < 0x10000; i++) + { + if(debugger->breakpoints().isSet(i)) + { + buf << debugger->equates().getFormatted(i, 4) << " "; + if(! (++count % 8) ) buf << "\n"; } } + commandResult += buf.str(); + /* if(count) return ret; diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 5da82071d..2174c15e5 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.126 2008-03-13 22:58:06 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.127 2008-04-02 21:22:16 stephena Exp $ //============================================================================ #include @@ -79,14 +79,14 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height) // Set the available video modes for this framebuffer setAvailableVidModes(); + // Set window title and icon + setWindowTitle(title); + if(myInitializedCount == 1) setWindowIcon(); + // Initialize video subsystem VideoMode mode = getSavedVidMode(); initSubsystem(mode); - // Set window title and icon - setWindowTitle(title); - setWindowIcon(); - // And refresh the display myOSystem->eventHandler().refreshDisplay();