Etterna 0.74.4
Loading...
Searching...
No Matches
InputHandler_Linux_Joystick.h
1#ifndef INPUT_HANDLER_LINUX_JOYSTICK_H
2#define INPUT_HANDLER_LINUX_JOYSTICK_H 1
3
4#include "InputHandler.h"
5#include "RageUtil/Misc/RageThreads.h"
6
8{
9 public:
10 enum
11 {
12 NUM_JOYSTICKS = 4
13 };
16 bool TryDevice(std::string dev);
17 bool DevicesChanged() { return m_bDevicesChanged; }
18 void GetDevicesAndDescriptions(std::vector<InputDeviceInfo>& vDevicesOut);
19
20 private:
21 void StartThread();
22 void StopThread();
23 static int InputThread_Start(void* p);
24 void InputThread();
25
26 int fds[NUM_JOYSTICKS];
27 int m_iLastFd;
28 std::string m_sDescription[NUM_JOYSTICKS];
29 RageThread m_InputThread;
30 bool m_bShutdown, m_bDevicesChanged;
31};
32
33#endif
Definition InputHandler_Linux_Joystick.h:8
A class designed to handle special input devices.
Definition InputHandler.h:23
Thread, mutex, semaphore, and event classes.
Definition RageThreads.h:155