Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
do the direct3d tap dance for overscan hint only if SDL_VIDEO_RENDER_…
…D3D == 1
  • Loading branch information
sezero committed May 10, 2018
1 parent a4d0571 commit fe032ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/render/SDL_render.c
Expand Up @@ -1275,6 +1275,7 @@ UpdateLogicalSize(SDL_Renderer *renderer)

hint = SDL_GetHint(SDL_HINT_RENDER_LOGICAL_SIZE_MODE);
if (hint && (*hint == '1' || SDL_strcasecmp(hint, "overscan") == 0)) {
#if SDL_VIDEO_RENDER_D3D
SDL_bool overscan_supported = SDL_TRUE;
/* Unfortunately, Direct3D 9 doesn't support negative viewport numbers
which the overscan implementation relies on.
Expand All @@ -1285,6 +1286,9 @@ UpdateLogicalSize(SDL_Renderer *renderer)
if (overscan_supported) {
scale_policy = 1;
}
#else
scale_policy = 1;
#endif
}

want_aspect = (float)renderer->logical_w / renderer->logical_h;
Expand Down

0 comments on commit fe032ff

Please sign in to comment.