Cogs.Core
LinuxGamepad.h
1#pragma once
2
3#include <array>
4
5#include <X11/X.h>
6#undef None
7#undef Always
8#undef Success
9
10typedef union _XEvent XEvent;
11
12namespace Cogs {
13 namespace Core {
14 class ViewContext;
15 }
16
17 namespace Platform {
18 class GamepadHandler
19 {
20 public:
21 void initialize(Core::ViewContext* viewContext);
22 void update();
23
24 private:
25 static constexpr double scanInterval = 2.0;
26 static constexpr int maxDevices = 4;
27
28 std::array<XID, maxDevices> deviceID;
29 double nextScanTime = 0.0;
30 Core::ViewContext* view;
31
32 void scanForDevices();
33 };
34 }
35}
Contains all Cogs related functionality.
Definition: FieldSetter.h:23