aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/events.cpp1
-rw-r--r--backends/platform/sdl/graphics.cpp7
-rw-r--r--backends/platform/sdl/sdl.h5
3 files changed, 9 insertions, 4 deletions
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp
index fe7fd7e5f9..0eff23778b 100644
--- a/backends/platform/sdl/events.cpp
+++ b/backends/platform/sdl/events.cpp
@@ -26,6 +26,7 @@
#include "backends/platform/sdl/sdl.h"
#include "common/util.h"
#include "common/events.h"
+#include "graphics/scaler/aspect.h" // for aspect2Real
// FIXME move joystick defines out and replace with confile file options
// we should really allow users to map any key to a joystick button
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);
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 78793d4aad..2c1a22e7d6 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -485,10 +485,7 @@ protected:
virtual bool saveScreenshot(const char *filename); // overloaded by CE backend
- int effectiveScreenHeight() const {
- return (_videoMode.aspectRatioCorrection ? real2Aspect(_videoMode.screenHeight) : _videoMode.screenHeight)
- * _videoMode.scaleFactor;
- }
+ int effectiveScreenHeight() const;
void setupIcon();
void handleKbdMouse();