rpi video - Use dispmanx scaling (#1)
* Use dispmanx scaling * There is the new SDL hint SDL_VIDEO_RPI_SCALE_MODE. There are three values. * The variable can be set to the following values: * "0" - Window resolution is desktop resolution. * This is the behaviour of SDL <= 2.0.4. (default) * "1" - Requested video resolution will be scaled to desktop resolution. * Aspect ratio of requested video resolution will be respected. * "2" - Requested video resolution will be scaled to desktop resolution * "3" - Integer scaling. dst_rect is an integral multiple of src_rect. Should prevent scaling artifacts. * Add aspect ratio hint
This commit is contained in:
parent
9a90520563
commit
e24d1ccab6
2 changed files with 106 additions and 10 deletions
|
@ -790,6 +790,33 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
|
||||
|
||||
/**
|
||||
* \brief Tell dispmanx to stretch the SDL window to fill the display.
|
||||
*
|
||||
* This hint only applies to the rpi video driver.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Window resolution is desktop resolution.
|
||||
* This is the behaviour of SDL <= 2.0.4. (default)
|
||||
* "1" - Requested video resolution will be scaled to desktop resolution.
|
||||
* Aspect ratio of requested video resolution will be respected.
|
||||
* "2" - Requested video resolution will be scaled to desktop resolution.
|
||||
* "3" - Requested video resolution will be scaled to desktop resolution.
|
||||
* Aspect ratio of requested video resolution will be respected.
|
||||
* If possible output resolution will be integral multiple of video
|
||||
* resolution.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_RPI_SCALE_MODE "SDL_VIDEO_RPI_SCALE_MODE"
|
||||
|
||||
/**
|
||||
* \brief Tell dispmanx to set a specific aspect ratio.
|
||||
*
|
||||
* This hint only applies to the rpi video driver.
|
||||
*
|
||||
* Must be set together with SDL_HINT_VIDEO_RPI_SCALE_MODE=1.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_RPI_RATIO "SDL_VIDEO_RPI_RATIO"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue