wavelength 1.0.0
Loading...
Searching...
No Matches
DIJoypad.h
Go to the documentation of this file.
1#pragma once
2
3#include <windows.h>
4
5#include <dinput.h>
6
12class DIJoypad {
13public:
21 explicit DIJoypad(const DIDEVICEINSTANCE *instance);
22
29
36 bool Acquire();
37
45 void SetAxesProperty(REFGUID property, LPDIPROPHEADER header);
46
48 LPDIRECTINPUTDEVICE mDevice;
49 LPDIRECTINPUTDEVICE2 mDevice2;
50 int mReserved0c; // +0x0c, cleared by the constructor and not read.
51 bool mReserved10; // +0x10, cleared by the constructor and not read.
52};
53
60void PrintDIError(HRESULT hr);
61
68extern int gDeadzone;
69
75extern LPDIRECTINPUT gLpdi;
void PrintDIError(HRESULT hr)
Print the name of a DirectInput error.
LPDIRECTINPUT gLpdi
The DirectInput object.
int gDeadzone
Dead zone of the joystick axes, from deadzone of the joypad configuration array, where 128 is the who...
void SetAxesProperty(REFGUID property, LPDIPROPHEADER header)
Set a property of the X, Y, Z, and Z rotation axes.
~DIJoypad()
Release the devices.
bool Acquire()
Acquire the device, reporting a failure.
DIJoypad(const DIDEVICEINSTANCE *instance)
Create the device of a joystick, set its data format, axis ranges, dead zone, and buffer,...
int mReserved0c
Definition DIJoypad.h:50
LPDIRECTINPUTDEVICE2 mDevice2
Definition DIJoypad.h:49
LPDIRECTINPUTDEVICE mDevice
Definition DIJoypad.h:48
bool mReserved10
Definition DIJoypad.h:51
DWORD mJoystickId
Definition DIJoypad.h:47