some util functions
| 7 | |
| 8 | //some util functions |
| 9 | std::string inputTypeToString(InputType type) |
| 10 | { |
| 11 | switch(type) |
| 12 | { |
| 13 | case TYPE_AXIS: |
| 14 | return "axis"; |
| 15 | case TYPE_BUTTON: |
| 16 | return "button"; |
| 17 | case TYPE_HAT: |
| 18 | return "hat"; |
| 19 | case TYPE_KEY: |
| 20 | return "key"; |
| 21 | default: |
| 22 | return "error"; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | InputType stringToInputType(const std::string& type) |
| 27 | { |