diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index c8ba27cc8..301f12e73 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -400,10 +400,10 @@ void FrameBuffer::update(UpdateMode mode) { myPausedCount = static_cast(7 * myOSystem.frameRate()); showTextMessage("Paused", MessagePosition::MiddleCenter); - renderTIA(shade, false); + renderTIA(false, shade); } if(rerender) - renderTIA(shade, false); + renderTIA(false, shade); break; // EventHandlerState::PAUSE } @@ -414,12 +414,12 @@ void FrameBuffer::update(UpdateMode mode) redraw |= myOSystem.optionsMenu().needsRedraw(); if(redraw) { - renderTIA(true); + renderTIA(true, true); myOSystem.optionsMenu().draw(forceRedraw); } else if(rerender) { - renderTIA(true); + renderTIA(true, true); myOSystem.optionsMenu().render(); } break; // EventHandlerState::OPTIONSMENU @@ -431,12 +431,12 @@ void FrameBuffer::update(UpdateMode mode) redraw |= myOSystem.commandMenu().needsRedraw(); if(redraw) { - renderTIA(true); + renderTIA(true, true); myOSystem.commandMenu().draw(forceRedraw); } else if(rerender) { - renderTIA(true); + renderTIA(true, true); myOSystem.commandMenu().render(); } break; // EventHandlerState::CMDMENU @@ -448,12 +448,12 @@ void FrameBuffer::update(UpdateMode mode) redraw |= myOSystem.highscoresMenu().needsRedraw(); if(redraw) { - renderTIA(true); + renderTIA(true, true); myOSystem.highscoresMenu().draw(forceRedraw); } else if(rerender) { - renderTIA(true); + renderTIA(true, true); myOSystem.highscoresMenu().render(); } break; // EventHandlerState::HIGHSCORESMENU @@ -465,7 +465,7 @@ void FrameBuffer::update(UpdateMode mode) redraw |= myOSystem.messageMenu().needsRedraw(); if(redraw) { - renderTIA(true); + renderTIA(true, true); myOSystem.messageMenu().draw(forceRedraw); } break; // EventHandlerState::MESSAGEMENU @@ -477,7 +477,7 @@ void FrameBuffer::update(UpdateMode mode) redraw |= myOSystem.plusRomsMenu().needsRedraw(); if(redraw) { - renderTIA(true); + renderTIA(true, true); myOSystem.plusRomsMenu().draw(forceRedraw); } break; // EventHandlerState::PLUSROMSMENU @@ -526,7 +526,7 @@ void FrameBuffer::update(UpdateMode mode) } redraw |= success; if(redraw) - renderTIA(false, false); + renderTIA(false); // Stop playback mode at the end of the state buffer // and switch to Time Machine or Pause mode @@ -960,7 +960,7 @@ void FrameBuffer::resetSurfaces() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameBuffer::renderTIA(bool shade, bool doClear) +void FrameBuffer::renderTIA(bool doClear, bool shade) { if(doClear) clear(); // TODO - test this: it may cause slowdowns on older systems diff --git a/src/emucore/FrameBuffer.hxx b/src/emucore/FrameBuffer.hxx index 26ebc5335..bd4e13655 100644 --- a/src/emucore/FrameBuffer.hxx +++ b/src/emucore/FrameBuffer.hxx @@ -194,6 +194,16 @@ class FrameBuffer */ const Common::Rect& imageRect() const { return myActiveVidMode.imageR; } + /** + Returns the current, non-rounde size of the framebuffer image. + Note that this will take into account the current scaling (if any) + as well as image 'centering'. + */ + void imageSize(double* w, double* h) const { + *w = myActiveVidMode.imageW; + *h = myActiveVidMode.imageH; + } + /** Returns the current dimensions of the framebuffer window. This is the entire area containing the framebuffer image as well as any @@ -433,10 +443,11 @@ class FrameBuffer /** Renders TIA and overlaying, optional bezel surface - @param shade Shade the TIA surface after rendering @param doClear Clear the framebuffer before rendering + @param shade Shade the TIA surface after rendering */ - void renderTIA(bool shade = false, bool doClear = true); + //void renderTIA(bool shade = false, bool doClear = true); + void renderTIA(bool doClear = true, bool shade = false); #ifdef GUI_SUPPORT /**