mirror of https://github.com/stella-emu/stella.git
some small fixes
This commit is contained in:
parent
53b3d0901c
commit
d3b46c742d
|
@ -1301,6 +1301,14 @@ FBInitStatus FrameBuffer::applyVideoMode()
|
|||
// Inform TIA surface about new mode, and update TIA settings
|
||||
if(inTIAMode)
|
||||
{
|
||||
#ifdef IMAGE_SUPPORT
|
||||
if(myBezelSurface)
|
||||
deallocateSurface(myBezelSurface);
|
||||
myBezelSurface = nullptr;
|
||||
if(showBezel)
|
||||
loadBezel();
|
||||
#endif
|
||||
|
||||
myTIASurface->initialize(myOSystem.console(), myActiveVidMode);
|
||||
if(fullScreen())
|
||||
myOSystem.settings().setValue("tia.fs_stretch",
|
||||
|
@ -1309,13 +1317,6 @@ FBInitStatus FrameBuffer::applyVideoMode()
|
|||
myOSystem.settings().setValue("tia.zoom", myActiveVidMode.zoom);
|
||||
}
|
||||
|
||||
#ifdef IMAGE_SUPPORT
|
||||
if(myBezelSurface)
|
||||
deallocateSurface(myBezelSurface);
|
||||
if(showBezel)
|
||||
loadBezel();
|
||||
#endif
|
||||
|
||||
resetSurfaces();
|
||||
setCursorState();
|
||||
myPendingRender = true;
|
||||
|
@ -1376,8 +1377,11 @@ bool FrameBuffer::loadBezel()
|
|||
// Scale bezel to fullscreen (preserve or stretch) or window size
|
||||
const uInt32 bezelH = std::min(myActiveVidMode.screenS.h,
|
||||
myActiveVidMode.imageR.h());
|
||||
myBezelSurface->setDstSize(myActiveVidMode.screenS.w, bezelH);
|
||||
myBezelSurface->setDstPos(0, (myActiveVidMode.screenS.h - bezelH) / 2); // center vertically
|
||||
const uInt32 bezelW = std::min(myActiveVidMode.screenS.w,
|
||||
static_cast<uInt32>(bezelH * (16.F / 9.F)));
|
||||
myBezelSurface->setDstSize(bezelW, bezelH);
|
||||
myBezelSurface->setDstPos((myActiveVidMode.screenS.w - bezelW) / 2,
|
||||
(myActiveVidMode.screenS.h - bezelH) / 2); // center
|
||||
myBezelSurface->setScalingInterpolation(ScalingInterpolation::sharp);
|
||||
}
|
||||
if(myBezelSurface)
|
||||
|
|
Loading…
Reference in New Issue