returns information about a requested function (type must be of an array == CTLBINDS_PER_FUNC)
| 476 | |
| 477 | // returns information about a requested function (type must be of an array == CTLBINDS_PER_FUNC) |
| 478 | void lnxgameController::get_controller_function(int id, ct_type *type, ct_config_data *value, uint8_t *flags) { |
| 479 | type[0] = m_ElementList[id].ctype[0]; |
| 480 | type[1] = m_ElementList[id].ctype[1]; |
| 481 | *value = makeword(CONTROLLER_CTL_INFO(m_ElementList[id].ctl[0], m_ElementList[id].ctl[1]), |
| 482 | CONTROLLER_CTL_VALUE(m_ElementList[id].value[0], m_ElementList[id].value[1])); |
| 483 | flags[0] = m_ElementList[id].flags[0]; |
| 484 | flags[1] = m_ElementList[id].flags[1]; |
| 485 | } |
| 486 | |
| 487 | // temporarily enables or disables a function |
| 488 | void lnxgameController::enable_function(int id, bool enable) { m_ElementList[id].enabled = enable; } |
no outgoing calls
no test coverage detected