ReactOS 0.4.15-dev-8102-g108db8f
device.h File Reference
#include "d3d9_haldevice.h"
Include dependency graph for device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT CreateD3D9HalDevice (LPDIRECT3D9_INT pDirect3D9, UINT Adapter, HWND hFocusWindow, DWORD BehaviourFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, DWORD NumAdaptersToCreate, struct IDirect3DDevice9 **ppReturnedDeviceInterface)
 

Function Documentation

◆ CreateD3D9HalDevice()

HRESULT CreateD3D9HalDevice ( LPDIRECT3D9_INT  pDirect3D9,
UINT  Adapter,
HWND  hFocusWindow,
DWORD  BehaviourFlags,
D3DPRESENT_PARAMETERS pPresentationParameters,
DWORD  NumAdaptersToCreate,
struct IDirect3DDevice9 **  ppReturnedDeviceInterface 
)

Definition at line 95 of file device.c.

100{
101 HRESULT Ret;
102
103 if (FAILED(AlignedAlloc((LPVOID *)ppReturnedDeviceInterface, sizeof(D3D9HALDEVICE))))
104 {
105 DPRINT1("Not enough memory to create HAL device");
106 return DDERR_OUTOFMEMORY;
107 }
108
109 Ret = InitD3D9BaseDevice((LPDIRECT3DDEVICE9_INT)*ppReturnedDeviceInterface, pDirect3D9, Adapter,
110 D3DDEVTYPE_HAL, hFocusWindow, BehaviourFlags,
111 pPresentationParameters, NumAdaptersToCreate);
112
113 if (FAILED(Ret))
114 {
115 AlignedFree((LPVOID)*ppReturnedDeviceInterface);
116 return Ret;
117 }
118
119 return D3D_OK;
120}
#define DPRINT1
Definition: precomp.h:8
@ D3DDEVTYPE_HAL
Definition: d3d8types.h:576
VOID AlignedFree(IN OUT LPVOID pObject)
Definition: d3d9_helpers.c:130
HRESULT AlignedAlloc(IN OUT LPVOID *ppObject, IN SIZE_T dwSize)
Definition: d3d9_helpers.c:95
#define D3D_OK
Definition: d3d.h:106
HRESULT InitD3D9BaseDevice(LPDIRECT3DDEVICE9_INT pThisBaseDevice, LPDIRECT3D9_INT pDirect3D9, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviourFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, DWORD NumAdaptersToCreate)
Definition: device.c:34
#define FAILED(hr)
Definition: intsafe.h:51
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111

Referenced by IDirect3D9Impl_CreateDevice().