diff --git a/src/common/Bezel.cxx b/src/common/Bezel.cxx index 850e57024..d5c0b34de 100644 --- a/src/common/Bezel.cxx +++ b/src/common/Bezel.cxx @@ -77,7 +77,7 @@ uInt32 Bezel::borderSize(uInt32 x, uInt32 y, uInt32 size, Int32 step) const uInt8 r, g, b, a; myFB.getRGBA(*pixels, &r, &g, &b, &a); - if(a < 255) + if(a < 255) // transparent pixel? return i; } return size - 1; @@ -86,13 +86,14 @@ uInt32 Bezel::borderSize(uInt32 x, uInt32 y, uInt32 size, Int32 step) const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Bezel::load() { + const Settings& settings = myOSystem.settings(); bool isValid = false; #ifdef IMAGE_SUPPORT const bool show = myOSystem.eventHandler().inTIAMode() && - myOSystem.settings().getBool("bezel.show") && - (myOSystem.settings().getBool("fullscreen") || - myOSystem.settings().getBool("bezel.windowed")); + settings.getBool("bezel.show") && + (settings.getBool("fullscreen") || + settings.getBool("bezel.windowed")); if(show) { @@ -122,15 +123,11 @@ bool Bezel::load() } } while(index != -1); } - catch(const runtime_error&) - { - isValid = false; - } + catch(const runtime_error&) { } } #endif if(isValid) { - const Settings& settings = myOSystem.settings(); const Int32 w = mySurface->width(); const Int32 h = mySurface->height(); uInt32 top, bottom, left, right; diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 41b05d83d..2cf5ef306 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -281,7 +281,7 @@ FBInitStatus FrameBuffer::createDisplay(string_view title, BufferType type, if(myBufferType == BufferType::Emulator) { -// myBezel->load(); + myBezel->load(); // make sure we have the correct bezel size // Determine possible TIA windowed zoom levels const double currentTIAZoom = @@ -1239,7 +1239,7 @@ void FrameBuffer::switchVideoMode(int direction) else if(direction == -1) zoom -= ZOOM_STEPS; // Make sure the level is within the allowable desktop size - zoom = BSPF::clamp(zoom, supportedTIAMinZoom(), supportedTIAMaxZoom()); + zoom = BSPF::clampw(zoom, supportedTIAMinZoom(), supportedTIAMaxZoom()); myOSystem.settings().setValue("tia.zoom", zoom); } else