Patched to compile on Windows when not supporting Direct3D.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 27 Jan 2014 16:10:15 -0500
changeset 8130506eb1e0ae85
parent 8129 47f67902b179
child 8131 311302021bc9
Patched to compile on Windows when not supporting Direct3D.
src/render/direct3d/SDL_render_d3d.c
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Mon Jan 27 17:59:19 2014 -0300
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Mon Jan 27 16:10:15 2014 -0500
     1.3 @@ -1890,12 +1890,16 @@
     1.4      }
     1.5      SDL_free(renderer);
     1.6  }
     1.7 +#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
     1.8  
     1.9 +/* This function needs to always exist for the Dynamic API. */
    1.10  IDirect3DDevice9 *
    1.11  SDL_RenderGetD3D9Device(SDL_Renderer * renderer)
    1.12  {
    1.13 +    IDirect3DDevice9 *device = NULL;
    1.14 +
    1.15 +#if SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED
    1.16      D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
    1.17 -    IDirect3DDevice9 *device;
    1.18  
    1.19      // Make sure that this is a D3D renderer
    1.20      if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
    1.21 @@ -1907,9 +1911,9 @@
    1.22      if (device) {
    1.23          IDirect3DDevice9_AddRef( device );
    1.24      }
    1.25 +#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
    1.26 +
    1.27      return device;
    1.28  }
    1.29  
    1.30 -#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
    1.31 -
    1.32  /* vi: set ts=4 sw=4 expandtab: */