forked from Hal47/dsfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3d9int.h
51 lines (45 loc) · 2.07 KB
/
d3d9int.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <d3d9.h>
#include <wrl/client.h>
struct hkIDirect3DDevice9;
extern Microsoft::WRL::ComPtr<hkIDirect3DDevice9> g_pDevice;
interface hkIDirect3D9 : public IDirect3D9 {
private:
// callback interface
IDirect3D9* m_pD3D9;
public:
// original interface
STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
STDMETHOD(RegisterSoftwareDevice)(void* pInitializeFunction);
STDMETHOD_(UINT, GetAdapterCount)();
STDMETHOD(GetAdapterIdentifier)
(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier);
STDMETHOD_(UINT, GetAdapterModeCount)(UINT Adapter, D3DFORMAT Format);
STDMETHOD(EnumAdapterModes)
(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode);
STDMETHOD(GetAdapterDisplayMode)(UINT Adapter, D3DDISPLAYMODE* pMode);
STDMETHOD(CheckDeviceType)
(UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat,
BOOL bWindowed);
STDMETHOD(CheckDeviceFormat)
(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType,
D3DFORMAT CheckFormat);
STDMETHOD(CheckDeviceMultiSampleType)
(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed,
D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels);
STDMETHOD(CheckDepthStencilMatch)
(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat,
D3DFORMAT DepthStencilFormat);
STDMETHOD(CheckDeviceFormatConversion)
(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat);
STDMETHOD(GetDeviceCaps)
(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps);
STDMETHOD_(HMONITOR, GetAdapterMonitor)(UINT Adapter);
STDMETHOD(CreateDevice)
(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags,
D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface);
hkIDirect3D9(IDirect3D9* pD3D9) : m_pD3D9(pD3D9) {}
virtual ~hkIDirect3D9() = default;
};