diff --git a/ControllerPatcher.cpp b/ControllerPatcher.cpp index 7baf03e..f22b114 100644 --- a/ControllerPatcher.cpp +++ b/ControllerPatcher.cpp @@ -691,7 +691,7 @@ CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::gettingInputAllDevices(Inp int buttons_hold = 0; - for(int pad = 0;padpad_count;pad++){ + for(int pad = 0;pad HID_MAX_PADS_COUNT) pad_count = HID_MAX_PADS_COUNT; pad = (pad/(pad_count))*pad_count; diff --git a/patcher/ControllerPatcherUtils.cpp b/patcher/ControllerPatcherUtils.cpp index 5194e8e..95016b2 100644 --- a/patcher/ControllerPatcherUtils.cpp +++ b/patcher/ControllerPatcherUtils.cpp @@ -301,7 +301,7 @@ CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcherUtils::checkActivePad(int hi if(deviceslot < 0 ) return CONTROLLER_PATCHER_ERROR_DEVICE_SLOT_NOT_FOUND; int connected_pads = config_controller[deviceslot][CONTRPS_CONNECTED_PADS][1]; - if(connected_pads & (1 << pad)){ + if((connected_pads & (1 << pad)) > 0){ return 1; } }