Rise
The Vieneo Province
Loading...
Searching...
No Matches
InputConfig.h
Go to the documentation of this file.
1#pragma once
2
3#include <WinSock2.h>
4#include <WS2tcpip.h>
5#include <Windows.h>
6#include <dinput.h> // LPDIRECTINPUTDEVICE8
7
8#include <string> // std::string
9#include "Guids.h" // GUID_DEFAULT
10
12{
13 GUID guid = MYGUID_DEFAULT; // 16 // this is a flag that it is not zeroed out
14 unsigned char axis = 0; // 1
15 bool invert = false; // 1
16 bool forceFeedback = false; // 1
17 bool split = false; // 1
18 char padding[11]; // 11 to make it an even 32? not sure why
19
20 // ------------------------------------------
21 // nothing past this point is saved or loaded
22 LPDIRECTINPUTDEVICE8 g_pJoystick = nullptr; // The joystick device
23 bool IsFreeTrack() const { return guid == MYGUID_FREETRACK; }
24 bool UsesMouse() const { return !g_pJoystick && !IsFreeTrack(); }
25 bool hasMoved = false;
26 std::string friendlyName;
27 long oldValue = 0;
28 DIJOYSTATE oldJs = {};
29};
const GUID MYGUID_DEFAULT
Definition Guids.h:5
const GUID MYGUID_FREETRACK
Definition Guids.h:8
bool IsFreeTrack() const
Definition InputConfig.h:23
bool forceFeedback
Definition InputConfig.h:16
LPDIRECTINPUTDEVICE8 g_pJoystick
Definition InputConfig.h:22
DIJOYSTATE oldJs
Definition InputConfig.h:28
std::string friendlyName
Definition InputConfig.h:26
unsigned char axis
Definition InputConfig.h:14
char padding[11]
Definition InputConfig.h:18
bool UsesMouse() const
Definition InputConfig.h:24