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
|
// Inform TIA surface about new mode, and update TIA settings
|
||||||
if(inTIAMode)
|
if(inTIAMode)
|
||||||
{
|
{
|
||||||
|
#ifdef IMAGE_SUPPORT
|
||||||
|
if(myBezelSurface)
|
||||||
|
deallocateSurface(myBezelSurface);
|
||||||
|
myBezelSurface = nullptr;
|
||||||
|
if(showBezel)
|
||||||
|
loadBezel();
|
||||||
|
#endif
|
||||||
|
|
||||||
myTIASurface->initialize(myOSystem.console(), myActiveVidMode);
|
myTIASurface->initialize(myOSystem.console(), myActiveVidMode);
|
||||||
if(fullScreen())
|
if(fullScreen())
|
||||||
myOSystem.settings().setValue("tia.fs_stretch",
|
myOSystem.settings().setValue("tia.fs_stretch",
|
||||||
|
@ -1309,13 +1317,6 @@ FBInitStatus FrameBuffer::applyVideoMode()
|
||||||
myOSystem.settings().setValue("tia.zoom", myActiveVidMode.zoom);
|
myOSystem.settings().setValue("tia.zoom", myActiveVidMode.zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef IMAGE_SUPPORT
|
|
||||||
if(myBezelSurface)
|
|
||||||
deallocateSurface(myBezelSurface);
|
|
||||||
if(showBezel)
|
|
||||||
loadBezel();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
resetSurfaces();
|
resetSurfaces();
|
||||||
setCursorState();
|
setCursorState();
|
||||||
myPendingRender = true;
|
myPendingRender = true;
|
||||||
|
@ -1376,8 +1377,11 @@ bool FrameBuffer::loadBezel()
|
||||||
// Scale bezel to fullscreen (preserve or stretch) or window size
|
// Scale bezel to fullscreen (preserve or stretch) or window size
|
||||||
const uInt32 bezelH = std::min(myActiveVidMode.screenS.h,
|
const uInt32 bezelH = std::min(myActiveVidMode.screenS.h,
|
||||||
myActiveVidMode.imageR.h());
|
myActiveVidMode.imageR.h());
|
||||||
myBezelSurface->setDstSize(myActiveVidMode.screenS.w, bezelH);
|
const uInt32 bezelW = std::min(myActiveVidMode.screenS.w,
|
||||||
myBezelSurface->setDstPos(0, (myActiveVidMode.screenS.h - bezelH) / 2); // center vertically
|
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);
|
myBezelSurface->setScalingInterpolation(ScalingInterpolation::sharp);
|
||||||
}
|
}
|
||||||
if(myBezelSurface)
|
if(myBezelSurface)
|
||||||
|
|
Loading…
Reference in New Issue