Pad Refactoring

Adds a window to setup multiple input types as once
All controllers are now handled by a single thread
[hcorion] evdev refactor
This commit is contained in:
RipleyTom 2017-08-15 14:03:07 +02:00 committed by Ani
parent a6ba7ed21c
commit 0457f23b13
28 changed files with 1776 additions and 1416 deletions

View file

@ -56,17 +56,19 @@ public:
mm_joystick_handler();
~mm_joystick_handler();
void Init(const u32 max_connect) override;
void Close();
private:
DWORD ThreadProcedure();
static DWORD WINAPI ThreadProcProxy(LPVOID parameter);
bool Init() override;
std::vector<std::string> ListDevices() override;
bool bindPadToDevice(std::shared_ptr<Pad> pad, const std::string& device) override;
void ThreadProc() override;
private:
bool is_init;
u32 supportedJoysticks;
mutable bool active;
HANDLE thread;
JOYINFOEX js_info;
JOYCAPS js_caps;
std::vector<std::shared_ptr<Pad>> bindings;
std::array<bool, 7> last_connection_status = {};
};