ReactOS  0.4.14-dev-293-g2b39b42
d3d9_cursor.c
Go to the documentation of this file.
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 
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 }
D3D9Cursor * CreateD3D9Cursor(struct _Direct3DDevice9_INT *pBaseDevice, struct _Direct3DSwapChain9_INT *pSwapChain)
Definition: d3d9_cursor.c:18
smooth NULL
Definition: ftsmooth.c:416
HRESULT AlignedAlloc(IN OUT LPVOID *ppObject, IN SIZE_T dwSize)
Definition: d3d9_helpers.c:95
#define DPRINT1
Definition: precomp.h:8