Debian Codegraph @

src/api/directinput/JoystickDirectInput.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2014-2021 Garrett Brown
3 * Copyright (C) 2014-2021 Team Kodi
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSE.md for more information.
7 */
8
9 #pragma once
10
11 #include "api/Joystick.h"
12
13 #define DIRECTINPUT_VERSION 0x0800
14 #include <dinput.h>
15
16 namespace JOYSTICK
17 {
18 class CJoystickDirectInput : public CJoystick
19 {
20 public:
21 CJoystickDirectInput(GUID deviceGuid,
22 LPDIRECTINPUTDEVICE8 joystickDevice,
23 const TCHAR *strName);
24
25 virtual ~CJoystickDirectInput(void);
26
27 virtual bool Equals(const CJoystick* rhs) const override;
28
29 virtual bool Initialize(void) override;
30
31 protected:
32 virtual bool ScanEvents(void) override;
33
34 private:
35 static BOOL CALLBACK EnumObjectsCallback(const DIDEVICEOBJECTINSTANCE *pdidoi, VOID *pContext);
36
37 GUID m_deviceGuid;
38 LPDIRECTINPUTDEVICE8 m_joystickDevice;
39 bool m_bAcquired = false;
40 };
41 }