Fix blank screen after exiting from GameInfoDialog.

This commit is contained in:
Stephen Anthony 2018-09-13 21:38:21 -02:30
parent d18f11afa2
commit b9bbbe1381
4 changed files with 13 additions and 19 deletions

View File

@ -420,7 +420,6 @@ void Console::setFormat(uInt32 format)
{
setPalette(myOSystem.settings().getString("palette"));
setTIAProperties();
myTIA->frameReset();
initializeVideo(); // takes care of refreshing the screen
initializeAudio(); // ensure that audio synthesis is set up to match emulation speed
myOSystem.resetFps(); // Reset FPS measurement

View File

@ -178,7 +178,7 @@ void TIA::reset()
if (myFrameManager)
{
myFrameManager->reset();
frameReset(); // Recalculate the size of the display
enableColorLoss(mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss"));
}
myFrontBufferScanlines = myFrameBufferScanlines = 0;
@ -189,18 +189,14 @@ void TIA::reset()
enableFixedColors(mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.debugcolors" : "plr.debugcolors"));
setFixedColorPalette(mySettings.getString("tia.dbgcolors"));
#ifdef DEBUGGER_SUPPORT
createAccessBase();
#endif // DEBUGGER_SUPPORT
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::frameReset()
{
// Blank the various framebuffers; they may contain graphical garbage
memset(myBackBuffer, 0, 160 * TIAConstants::frameBufferHeight);
memset(myFrontBuffer, 0, 160 * TIAConstants::frameBufferHeight);
memset(myFramebuffer, 0, 160 * TIAConstants::frameBufferHeight);
enableColorLoss(mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss"));
#ifdef DEBUGGER_SUPPORT
createAccessBase();
#endif // DEBUGGER_SUPPORT
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -136,11 +136,6 @@ class TIA : public Device
*/
void reset() override;
/**
Reset frame to current YStart/Height properties.
*/
void frameReset();
/**
Install TIA in the specified system. Invoked by the system
when the TIA is attached to it.
@ -254,7 +249,7 @@ class TIA : public Device
/**
Changes the current Height/YStart properties.
Note that calls to these method(s) must be eventually followed by
::frameReset() for the changes to take effect.
::reset() for the changes to take effect.
*/
void setHeight(uInt32 height) { myFrameManager->setFixedHeight(height); }
void setYStart(uInt32 ystart) { myFrameManager->setYstart(ystart); }

View File

@ -568,7 +568,11 @@ void GameInfoDialog::saveConfig()
}
instance().frameBuffer().tiaSurface().enablePhosphor(myPhosphor->getState(), myPPBlend->getValue());
if (reset)
instance().console().tia().frameReset();
instance().console().tia().reset();
// Certain calls above may blank the TIA image (notably, setFormat)
// So we make sure we have a valid image when the dialog exits
instance().console().tia().renderToFrameBuffer();
}
else
{