Skip to content
Permalink
Browse files

Patched to compile on Windows when not supporting Direct3D.

  • Loading branch information
icculus committed Jan 27, 2014
1 parent 3347931 commit 87cfee27d0ad5d3525280a8620d2e7fb5572d108
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/render/direct3d/SDL_render_d3d.c
@@ -1890,12 +1890,16 @@ D3D_DestroyRenderer(SDL_Renderer * renderer)
}
SDL_free(renderer);
}
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */

/* This function needs to always exist for the Dynamic API. */
IDirect3DDevice9 *
SDL_RenderGetD3D9Device(SDL_Renderer * renderer)
{
IDirect3DDevice9 *device = NULL;

#if SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED
D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
IDirect3DDevice9 *device;

// Make sure that this is a D3D renderer
if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
@@ -1907,9 +1911,9 @@ SDL_RenderGetD3D9Device(SDL_Renderer * renderer)
if (device) {
IDirect3DDevice9_AddRef( device );
}
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */

return device;
}

#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 87cfee2

Please sign in to comment.