mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-30 15:17:27 +00:00
31 lines
590 B
C++
31 lines
590 B
C++
#pragma once
|
|
|
|
#include "Emu/Io/PadHandler.h"
|
|
#include <Xinput.h>
|
|
|
|
class XInputPadHandler final : public PadHandlerBase
|
|
{
|
|
public:
|
|
XInputPadHandler();
|
|
~XInputPadHandler();
|
|
|
|
void Init(const u32 max_connect) override;
|
|
void Close();
|
|
|
|
private:
|
|
typedef void (WINAPI * PFN_XINPUTENABLE)(BOOL);
|
|
typedef DWORD (WINAPI * PFN_XINPUTGETSTATE)(DWORD, XINPUT_STATE *);
|
|
|
|
private:
|
|
DWORD ThreadProcedure();
|
|
static DWORD WINAPI ThreadProcProxy(LPVOID parameter);
|
|
|
|
private:
|
|
mutable bool active;
|
|
HANDLE thread;
|
|
HMODULE library;
|
|
PFN_XINPUTGETSTATE xinputGetState;
|
|
PFN_XINPUTENABLE xinputEnable;
|
|
|
|
};
|