mirror of https://github.com/PCSX2/pcsx2.git
PAD: Fix incorrect MAX_KEYS check
This commit is contained in:
parent
1a0b8fb37f
commit
444dce4aeb
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
static const u32 MAX_KEYS = 25;
|
||||
|
||||
enum gamePadValues
|
||||
{
|
||||
PAD_UP, // Directional pad ↑
|
||||
|
@ -46,7 +44,8 @@ enum gamePadValues
|
|||
PAD_R_UP, // Right joystick (Up) ↑
|
||||
PAD_R_RIGHT, // Right joystick (Right) →
|
||||
PAD_R_DOWN, // Right joystick (Down) ↓
|
||||
PAD_R_LEFT // Right joystick (Left) ←
|
||||
PAD_R_LEFT, // Right joystick (Left) ←
|
||||
MAX_KEYS,
|
||||
};
|
||||
|
||||
static inline bool IsAnalogKey(int index)
|
||||
|
|
|
@ -546,7 +546,7 @@ bool PAD::MapController(SettingsInterface& si, u32 controller,
|
|||
|
||||
void PAD::SetControllerState(u32 controller, u32 bind, float value)
|
||||
{
|
||||
if (controller >= NUM_CONTROLLER_PORTS || bind >= MAX_KEYS)
|
||||
if (controller >= NUM_CONTROLLER_PORTS || bind > MAX_KEYS)
|
||||
return;
|
||||
|
||||
g_key_status.Set(controller, bind, value);
|
||||
|
|
Loading…
Reference in New Issue