Skip to content
Permalink
Browse files

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 fe032ff4c998236d5d52d29b2fdf8899d4525630
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/render/SDL_render.c
@@ -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.
@@ -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;

0 comments on commit fe032ff

Please sign in to comment.