-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
45 lines (39 loc) · 958 Bytes
/
config.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
#include <SDL2/SDL_gamecontroller.h>
#include <cstdint>
#include <vector>
#pragma once
typedef unsigned int uint;
struct ConfiguredButton {
SDL_GameControllerButton button;
bool pending;
float accX;
float accY;
float accZ;
float pitch;
float yaw;
float roll;
ConfiguredButton(SDL_GameControllerButton btn, bool pend, float aX, float aY, float aZ, float p, float y, float r) {
button = btn;
pending = pend;
accX = aX;
accY = aY;
accZ = aZ;
pitch = p;
yaw = y;
roll = r;
}
ConfiguredButton(int btn, bool pend, float aX, float aY, float aZ, float p, float y, float r) {
button = (SDL_GameControllerButton)btn;
pending = pend;
accX = aX;
accY = aY;
accZ = aZ;
pitch = p;
yaw = y;
roll = r;
}
};
struct Config {
uint port = 26760;
std::vector<ConfiguredButton> buttons;
};