1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS ReactX 4 * FILE: dll/directx/d3d9/d3d9_cursor.c 5 * PURPOSE: d3d9.dll internal cursor methods 6 * PROGRAMERS: Gregor Gullwi <gbrunmar (dot) ros (at) gmail (dot) com> 7 */ 8 #include "d3d9_cursor.h" 9 10 #include <debug.h> 11 #include <d3d9.h> 12 #include "d3d9_private.h" 13 #include "adapter.h" 14 #include "d3d9_device.h" 15 #include "d3d9_swapchain.h" 16 #include "d3d9_helpers.h" 17 CreateD3D9Cursor(struct _Direct3DDevice9_INT * pBaseDevice,struct _Direct3DSwapChain9_INT * pSwapChain)18D3D9Cursor* CreateD3D9Cursor(struct _Direct3DDevice9_INT* pBaseDevice, struct _Direct3DSwapChain9_INT* pSwapChain) 19 { 20 D3D9Cursor* pCursor; 21 22 if (FAILED(AlignedAlloc((LPVOID*)&pCursor, sizeof(D3D9Cursor)))) 23 { 24 DPRINT1("Failed to allocate D3D9Cursor"); 25 return NULL; 26 } 27 28 pCursor->pBaseDevice = pBaseDevice; 29 pCursor->pSwapChain = pSwapChain; 30 pCursor->dwWidth = pSwapChain->dwWidth / 2; 31 pCursor->dwHeight = pSwapChain->dwHeight / 2; 32 33 return pCursor; 34 } 35