aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl/graphics.cpp')
-rw-r--r--backends/platform/sdl/graphics.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index 10716fe89a..705b44215e 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -32,6 +32,7 @@
#include "graphics/font.h"
#include "graphics/fontman.h"
#include "graphics/scaler.h"
+#include "graphics/scaler/aspect.h"
#include "graphics/surface.h"
static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
@@ -476,6 +477,12 @@ void OSystem_SDL::initSize(uint w, uint h, const Graphics::PixelFormat *format)
_dirtyChecksums = (uint32 *)calloc(_cksumNum * 2, sizeof(uint32));
}
+int OSystem_SDL::effectiveScreenHeight() const {
+ return _videoMode.scaleFactor *
+ (_videoMode.aspectRatioCorrection
+ ? real2Aspect(_videoMode.screenHeight)
+ : _videoMode.screenHeight);
+}
static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &width, int &height) {
assert(&width != &height);