diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/gp2x/events.cpp | 1 | ||||
-rw-r--r-- | backends/platform/gp2x/graphics.cpp | 1 | ||||
-rw-r--r-- | backends/platform/gp2xwiz/gp2xwiz-graphics.cpp | 1 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-events.cpp | 2 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-graphics.cpp | 1 | ||||
-rw-r--r-- | backends/platform/sdl/events.cpp | 1 | ||||
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 7 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 5 |
8 files changed, 14 insertions, 5 deletions
diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp index e0117e9313..496e045ab0 100644 --- a/backends/platform/gp2x/events.cpp +++ b/backends/platform/gp2x/events.cpp @@ -33,6 +33,7 @@ #include "backends/keymapper/keymapper.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 using the keymapper. diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index 27732007bc..cae596b9ff 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -34,6 +34,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[] = { diff --git a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp index 18b9fc133b..b23c3388e1 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp @@ -29,6 +29,7 @@ #include "graphics/font.h" #include "graphics/fontman.h" #include "graphics/scaler.h" +#include "graphics/scaler/aspect.h" #include "graphics/scaler/downscaler.h" #include "graphics/surface.h" diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp index 007f7c732b..4bb3568ebd 100644 --- a/backends/platform/linuxmoto/linuxmoto-events.cpp +++ b/backends/platform/linuxmoto/linuxmoto-events.cpp @@ -24,7 +24,7 @@ */ #include "backends/platform/linuxmoto/linuxmoto-sdl.h" -#include "backends/platform/sdl/sdl.h" +#include "graphics/scaler/aspect.h" // for aspect2Real static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { if (key >= SDLK_F1 && key <= SDLK_F9) { diff --git a/backends/platform/linuxmoto/linuxmoto-graphics.cpp b/backends/platform/linuxmoto/linuxmoto-graphics.cpp index b25dc16b91..01d954f9b9 100644 --- a/backends/platform/linuxmoto/linuxmoto-graphics.cpp +++ b/backends/platform/linuxmoto/linuxmoto-graphics.cpp @@ -29,6 +29,7 @@ #include "graphics/font.h" #include "graphics/fontman.h" #include "graphics/scaler.h" +#include "graphics/scaler/aspect.h" #include "graphics/scaler/downscaler.h" #include "graphics/surface.h" 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(); |