mirror of https://github.com/libsdl-org/SDL
313881175d
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); |
||
---|---|---|
VisualC | ||
VisualC-WinRT | ||
Xcode | ||
Xcode-iOS | ||
acinclude | ||
android-project | ||
build-scripts | ||
cmake | ||
debian | ||
docs | ||
include | ||
premake | ||
src | ||
test | ||
visualtest | ||
.hgignore | ||
Android.mk | ||
BUGS.txt | ||
CMakeLists.txt | ||
COPYING.txt | ||
CREDITS.txt | ||
INSTALL.txt | ||
Makefile.in | ||
Makefile.minimal | ||
Makefile.pandora | ||
Makefile.psp | ||
Makefile.wiz | ||
README-SDL.txt | ||
README.txt | ||
SDL2.spec.in | ||
TODO.txt | ||
VisualC.html | ||
WhatsNew.txt | ||
autogen.sh | ||
cmake_uninstall.cmake.in | ||
configure | ||
configure.in | ||
sdl2-config.in | ||
sdl2.m4 | ||
sdl2.pc.in |
README.txt
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)