do the direct3d tap dance for overscan hint only if SDL_VIDEO_RENDER_D3D == 1
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 10 May 2018 08:25:23 +0300
changeset 119609f61cd1be333
parent 11959 4cc8aad8d434
child 11961 a9203ed58516
do the direct3d tap dance for overscan hint only if SDL_VIDEO_RENDER_D3D == 1
src/render/SDL_render.c
     1.1 --- a/src/render/SDL_render.c	Mon May 07 20:10:12 2018 -0700
     1.2 +++ b/src/render/SDL_render.c	Thu May 10 08:25:23 2018 +0300
     1.3 @@ -1275,6 +1275,7 @@
     1.4  
     1.5      hint = SDL_GetHint(SDL_HINT_RENDER_LOGICAL_SIZE_MODE);
     1.6      if (hint && (*hint == '1' || SDL_strcasecmp(hint, "overscan") == 0))  {
     1.7 +#if SDL_VIDEO_RENDER_D3D
     1.8          SDL_bool overscan_supported = SDL_TRUE;
     1.9          /* Unfortunately, Direct3D 9 doesn't support negative viewport numbers
    1.10             which the overscan implementation relies on.
    1.11 @@ -1285,6 +1286,9 @@
    1.12          if (overscan_supported) {
    1.13              scale_policy = 1;
    1.14          }
    1.15 +#else
    1.16 +        scale_policy = 1;
    1.17 +#endif
    1.18      }
    1.19  
    1.20      want_aspect = (float)renderer->logical_w / renderer->logical_h;