Patched to compile on Windows when not supporting Direct3D.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 27 Jan 2014 16:10:15 -0500
changeset 8130 506eb1e0ae85
parent 8129 47f67902b179
child 8131 311302021bc9
Patched to compile on Windows when not supporting Direct3D.
src/render/direct3d/SDL_render_d3d.c
--- a/src/render/direct3d/SDL_render_d3d.c	Mon Jan 27 17:59:19 2014 -0300
+++ b/src/render/direct3d/SDL_render_d3d.c	Mon Jan 27 16:10:15 2014 -0500
@@ -1890,12 +1890,16 @@
     }
     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 @@
     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: */