mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Win32 buildfix and warning fix.
I don't know how many pads are supposed to be supported, but I went with a reasonable number until the proper amount is committed.
This commit is contained in:
parent
62aafbbf48
commit
9672701743
2 changed files with 4 additions and 2 deletions
|
@ -143,6 +143,8 @@ DinputDevice::DinputDevice(int devnum) {
|
|||
return;
|
||||
}
|
||||
|
||||
const int MAX_NUM_PADS = 4;
|
||||
|
||||
if (devnum >= MAX_NUM_PADS)
|
||||
{
|
||||
return;
|
||||
|
@ -318,7 +320,7 @@ void DinputDevice::ApplyButtons(DIJOYSTATE2 &state, InputState &input_state) {
|
|||
}
|
||||
}
|
||||
|
||||
int DinputDevice::getNumPads()
|
||||
size_t DinputDevice::getNumPads()
|
||||
{
|
||||
if (devices.empty())
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
~DinputDevice();
|
||||
virtual int UpdateState(InputState &input_state);
|
||||
virtual bool IsPad() { return true; }
|
||||
static int getNumPads();
|
||||
static size_t getNumPads();
|
||||
private:
|
||||
void ApplyButtons(DIJOYSTATE2 &state, InputState &input_state);
|
||||
//unfortunate and unclean way to keep only one DirectInput instance around
|
||||
|
|
Loading…
Add table
Reference in a new issue