mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
2210b19244
Picks the first Xinput device available, waits 100 frames between retries when no devices are available. Controls are hardcoded so every x360 controller button corresponds to the PSP button in the same physical position. Input from right stick and from analog triggers is ignored. The Xinput code though is overriden by SampleControls' hardcoded keyboard input. XinputDevice was tested to work with samples/controller/basic when SampleControls is disabled.
18 lines
267 B
C++
18 lines
267 B
C++
#pragma once
|
|
#include "InputDevice.h"
|
|
#include "Xinput.h"
|
|
|
|
class XinputDevice :
|
|
public InputDevice
|
|
{
|
|
public:
|
|
XinputDevice();
|
|
virtual int UpdateState();
|
|
private:
|
|
void ApplyDiff(XINPUT_STATE &state);
|
|
int gamepad_idx;
|
|
int check_delay;
|
|
XINPUT_STATE prevState;
|
|
};
|
|
|