mirror of https://github.com/stella-emu/stella.git
reworked some comments
This commit is contained in:
parent
fefec189b0
commit
065c0243d6
|
@ -361,7 +361,7 @@ void RomImageWidget::zoomSurface(bool zoomed, bool force)
|
|||
|
||||
if(!zoomed)
|
||||
{
|
||||
// Scale surface to available image area
|
||||
// Scale surface to available widget area
|
||||
const float scale = std::min(
|
||||
static_cast<float>(_w) / mySrcRect.w(),
|
||||
static_cast<float>(myImageHeight) / mySrcRect.h()) * scaleDpi;
|
||||
|
@ -372,8 +372,8 @@ void RomImageWidget::zoomSurface(bool zoomed, bool force)
|
|||
}
|
||||
else
|
||||
{
|
||||
// display zoomed image centered over mouse position, considering launcher borders
|
||||
myZoomPos = myMousePos;
|
||||
// Scale surface to available launcher area
|
||||
myZoomPos = myMousePos; // remember initial zoom position
|
||||
|
||||
const Int32 b = 3 * scaleDpi;
|
||||
const Common::Size maxSize = instance().frameBuffer().fullScreen()
|
||||
|
@ -383,7 +383,7 @@ void RomImageWidget::zoomSurface(bool zoomed, bool force)
|
|||
const Int32 lh = maxSize.h - b * 2;
|
||||
const Int32 iw = mySrcRect.w() * scaleDpi;
|
||||
const Int32 ih = mySrcRect.h() * scaleDpi;
|
||||
const float zoom = std::min(1.F,
|
||||
const float zoom = std::min(1.F, // do not zoom beyond original size
|
||||
std::min(static_cast<float>(lw) / iw,
|
||||
static_cast<float>(lh) / ih));
|
||||
const Int32 w = iw * zoom;
|
||||
|
|
|
@ -81,8 +81,8 @@ class RomImageWidget : public Widget
|
|||
// Zoom delay [frames]
|
||||
static constexpr uInt32 DELAY_TIME = 45;
|
||||
|
||||
// The zoom is faster requested than released, so that repeated zooms are
|
||||
// shown faster. This constant defines how much faster.
|
||||
// The zoom is faster requested than released, so that repeated zooms
|
||||
// are shown faster. This constant defines how much faster.
|
||||
static constexpr uInt32 REQUEST_SPEED = 2;
|
||||
|
||||
// Surface pointer holding the image
|
||||
|
@ -91,12 +91,12 @@ class RomImageWidget : public Widget
|
|||
// Surface pointer holding the navigation elements
|
||||
shared_ptr<FBSurface> myNavSurface;
|
||||
|
||||
// Whether the surface should be redrawn by drawWidget()
|
||||
bool mySurfaceIsValid{false};
|
||||
|
||||
// Surface pointer holding the frame around the zoomed image
|
||||
shared_ptr<FBSurface> myFrameSurface;
|
||||
|
||||
// Whether the surface should be redrawn by drawWidget()
|
||||
bool mySurfaceIsValid{false};
|
||||
|
||||
// Rectangle holdering the original surface size
|
||||
Common::Rect mySrcRect;
|
||||
|
||||
|
|
Loading…
Reference in New Issue