| 1 | #include "ControllerHelpers.h" |
| 2 | |
| 3 | bool DoesControllerSupport(ControllerType type, ControllerSupport supportType) |
| 4 | { |
| 5 | switch (type) |
| 6 | { |
| 7 | case CONTROLLER_XBOX360: |
| 8 | if (supportType == SUPPORTS_RUMBLE) |
| 9 | return true; |
| 10 | return false; |
| 11 | case CONTROLLER_XBOX360W: |
| 12 | if (supportType == SUPPORTS_PAIRING) |
| 13 | return true; |
| 14 | return false; |
| 15 | case CONTROLLER_XBOXONE: |
| 16 | switch (supportType) |
| 17 | { |
| 18 | case SUPPORTS_RUMBLE: |
| 19 | return true; |
| 20 | case SUPPORTS_BLUETOOTH: |
| 21 | return true; |
| 22 | default: |
| 23 | return false; |
| 24 | } |
| 25 | case CONTROLLER_XBOXONEW: |
| 26 | if (supportType == SUPPORTS_NOTHING) |
| 27 | return true; |
| 28 | return false; |
| 29 | case CONTROLLER_DUALSHOCK3: |
| 30 | switch (supportType) |
| 31 | { |
| 32 | case SUPPORTS_RUMBLE: |
| 33 | return true; |
| 34 | case SUPPORTS_BLUETOOTH: |
| 35 | return true; |
| 36 | case SUPPORTS_PRESSUREBUTTONS: |
| 37 | return true; |
| 38 | case SUPPORTS_SIXAXIS: |
| 39 | return true; |
| 40 | default: |
| 41 | return false; |
| 42 | } |
| 43 | case CONTROLLER_DUALSHOCK4: |
| 44 | switch (supportType) |
| 45 | { |
| 46 | case SUPPORTS_RUMBLE: |
| 47 | return true; |
| 48 | case SUPPORTS_BLUETOOTH: |
| 49 | return true; |
| 50 | case SUPPORTS_SIXAXIS: |
| 51 | return true; |
| 52 | default: |
| 53 | return false; |
| 54 | } |
| 55 | default: |
| 56 | return false; |
| 57 | } |
| 58 | return false; |
| 59 | } |
no outgoing calls
no test coverage detected