Multiple Gamepad support for Windows

This commit is contained in:
loki 2020-01-25 01:27:47 +01:00
commit 8b7c833cd4
3 changed files with 27 additions and 16 deletions

View file

@ -125,7 +125,7 @@ void passthrough(platf::input_t &input, PNV_SCROLL_PACKET packet) {
}
void passthrough(std::shared_ptr<input_t> &input, PNV_MULTI_CONTROLLER_PACKET packet) {
if(packet->controllerNumber < 0 || packet->controllerNumber > input->gamepads.size()) {
if(packet->controllerNumber < 0 || packet->controllerNumber >= input->gamepads.size()) {
BOOST_LOG(warning) << "ControllerNumber out of range ["sv << packet->controllerNumber << ']';
return;