src/render/direct3d/SDL_render_d3d.c
changeset 7763 fc802d707136
parent 7762 51abf7664304
child 7764 0f48b5f28668
equal deleted inserted replaced
7762:51abf7664304 7763:fc802d707136
  1873         SDL_free(data);
  1873         SDL_free(data);
  1874     }
  1874     }
  1875     SDL_free(renderer);
  1875     SDL_free(renderer);
  1876 }
  1876 }
  1877 
  1877 
       
  1878 IDirect3DDevice9 *
       
  1879 SDL_RenderGetD3DDevice(SDL_Renderer * renderer)
       
  1880 {
       
  1881 	D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
       
  1882 
       
  1883 	// Make sure that this is a D3D renderer
       
  1884 	if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
       
  1885 		SDL_SetError("Renderer is not a D3D renderer");
       
  1886 		return NULL;
       
  1887 	}
       
  1888 	return data->device;
       
  1889 }
       
  1890 
  1878 #endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
  1891 #endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
  1879 
  1892 
  1880 /* vi: set ts=4 sw=4 expandtab: */
  1893 /* vi: set ts=4 sw=4 expandtab: */