OpenBarnyard
 
Loading...
Searching...
No Matches
TInputInterface_Win.h
Go to the documentation of this file.
1#pragma once
2#include "Includes.h"
4
6
8{
9public:
11
12public:
14 {
15 m_poDirectInput8 = NULL;
16 m_hMainWindow = NULL;
17 m_bExclusive = TTRUE;
18 }
19
20 virtual ~TInputDXInterface() override
21 {
23
24 if ( m_poDirectInput8 )
25 {
26 m_poDirectInput8->Release();
27 m_poDirectInput8 = TNULL;
28 }
29 }
30
31 virtual TBOOL Initialise() override;
32 virtual TBOOL Deinitialise() override;
33 virtual void SetExclusiveMode( TBOOL a_bIsExclusive ) override;
34 virtual void RefreshDirect() {}
35
37
38 HWND GetMainWindow() const
39 {
40 return m_hMainWindow;
41 }
42
43 void SetMainWindow( HWND a_hMainWindow )
44 {
45 m_hMainWindow = a_hMainWindow;
46 }
47
48private:
49 static BOOL CALLBACK EnumerateDeviceCallback( LPCDIDEVICEINSTANCEA a_poDeviceInstance, LPVOID poDXInputInterface );
50
51 LPDIRECTINPUT8A GetDirectInput() const
52 {
53 return m_poDirectInput8;
54 }
55
56private:
57 LPDIRECTINPUT8A m_poDirectInput8; // 0x30
58 HWND m_hMainWindow; // 0x34
59 TBOOL m_bExclusive; // 0x38
60};
61
Input system interface for the Toshi engine.
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
#define TNULL
Definition Typedefs.h:23
#define TTRUE
Definition Typedefs.h:25
bool TBOOL
Definition Typedefs.h:6
virtual TBOOL Deinitialise() override
virtual void RefreshDirect()
virtual ~TInputDXInterface() override
virtual void SetExclusiveMode(TBOOL a_bIsExclusive) override
TDECLARE_CLASS(TInputDXInterface, TInputInterface)
void SetMainWindow(HWND a_hMainWindow)
virtual TBOOL Initialise() override