| 516 | } |
| 517 | |
| 518 | XInputController::Range * XInputController::getRangeFromEnum(XInputControl ctrl) { |
| 519 | switch (ctrl) { |
| 520 | case(TRIGGER_LEFT): return &rangeTrigLeft; |
| 521 | case(TRIGGER_RIGHT): return &rangeTrigRight; |
| 522 | case(JOY_LEFT): return &rangeJoyLeft; |
| 523 | case(JOY_RIGHT): return &rangeJoyRight; |
| 524 | default: return nullptr; |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | int32_t XInputController::rescaleInput(int32_t val, const Range& in, const Range& out) { |
| 529 | if (val <= in.min) return out.min; // Out of range - |
nothing calls this directly
no outgoing calls
no test coverage detected