Navigation Menu

Skip to content

Commit

Permalink
overscan (feature for SDL_RenderSetLogicalSize): Fix to ignore oversc…
Browse files Browse the repository at this point in the history
…an hint when using the Direct3D 9 backend.

D39 does not support negative viewport values which the current implementation relies on.
D3D11 does support negative viewport values so that will continue working.
Refer to Bug 2799.
  • Loading branch information
Eric Wing committed Apr 5, 2016
1 parent d77a557 commit bb3cb4f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/render/SDL_render.c
Expand Up @@ -1153,7 +1153,16 @@ UpdateLogicalSize(SDL_Renderer *renderer)
if (!hint) {
scale_policy = 0;
} else if ( *hint == '1' || SDL_strcasecmp(hint, "overscan") == 0) {
scale_policy = 1;
/* Unfortunately, Direct3D 9 does't support negative viewport numbers
which the main overscan implementation relies on.
D3D11 does support negative values and uses a different id string
so overscan will work for D3D11.
*/
if(SDL_strcasecmp("direct3d", SDL_GetCurrentVideoDriver())) {
scale_policy = 0;
} else {
scale_policy = 1;
}
} else {
scale_policy = 0;
}
Expand Down

0 comments on commit bb3cb4f

Please sign in to comment.