Simple Directmedia Layer
Go to file
Eric Wing 313881175d Adds support to control the scaling policy/mode of SDL_RenderSetLogicalSize for both letterbox (current behavior) and a new overscan mode (expand to fill the entire screen, even if some parts draw off the screen).
The expected use case is for games that are designed with multiple aspect ratios already in mind and leave optional margins on the edges of the game which won't hurt if they are cut off.

An example use case is a game is designed for wide-screen/16:9, but then wants to deploy on an iPad which is 4:3. Normally, SDL will letterbox, which will shrink things and result in wasted space. But the designer already thought about 4:3 and designed the edges of the game so they could be cut off without any functional loss. So rather than wasting space with letterboxing, "overscan" mode will zoom the rendering to fill up the entire screen. Parts on the edges will be drawn offscreen, but since the game was already designed with this in mind, it is fine. The end result is the iPad (4:3) experience is much better since it feels like a game designed for that screen aspect ratio.

This patch introduces a new SDL_hint: SDL_HINT_RENDER_LOGICAL_SIZE_MODE.
Valid values are "letterbox" or "0" for letterboxing and "overscan" or "1" for overscan.
The default mode is letterbox to preserve existing behavior.

// Example usage:
SDL_SetHint(SDL_HINT_RENDER_LOGICAL_SIZE_MODE, "overscan");
SDL_RenderSetLogicalSize(renderer, SCREEN_WIDTH, SCREEN_HEIGHT);
2014-12-03 04:41:26 -08:00
acinclude Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
android-project Added name for second Java Thread on Android. 2014-11-23 20:35:51 +01:00
build-scripts Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
cmake Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
debian Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
docs WinRT: removed SDL_HINT_WINRT_PREF_PATH_ROOT (introduced post-2.0.3 & pre-2.0.4) 2014-12-02 21:18:50 -05:00
include Adds support to control the scaling policy/mode of SDL_RenderSetLogicalSize for both letterbox (current behavior) and a new overscan mode (expand to fill the entire screen, even if some parts draw off the screen). 2014-12-03 04:41:26 -08:00
premake Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
src Adds support to control the scaling policy/mode of SDL_RenderSetLogicalSize for both letterbox (current behavior) and a new overscan mode (expand to fill the entire screen, even if some parts draw off the screen). 2014-12-03 04:41:26 -08:00
test Fix assert format strings/parameters in testautomation modules; improve output of SDL_CompareSurfaces to aid debugging; update platform_testSetErrorInvalidInput for SDL changes 2014-11-30 20:55:27 -08:00
VisualC Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
VisualC-WinRT Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
visualtest Removed generated doxygen output of visual test suite. 2014-11-30 22:17:12 +01:00
Xcode add controllermap program to SDLTest xcode project 2014-11-23 15:21:49 -05:00
Xcode-iOS Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
.hgignore Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Android.mk Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
autogen.sh Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
BUGS.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
cmake_uninstall.cmake.in Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
CMakeLists.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
configure Fixed bug 2795 - SDL library detection selects the wrong lib 2014-11-29 14:41:18 -08:00
configure.in Fixed bug 2795 - SDL library detection selects the wrong lib 2014-11-29 14:41:18 -08:00
COPYING.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
CREDITS.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
INSTALL.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Makefile.in Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Makefile.minimal Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Makefile.pandora Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Makefile.psp Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Makefile.wiz Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
README-SDL.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
README.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
sdl2-config.in Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
sdl2.m4 Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
sdl2.pc.in Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
SDL2.spec.in Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
TODO.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
VisualC.html Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
WhatsNew.txt Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
http://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)