void InputMapper::ClearFromInputMap( GameInput GameI, int iSlotIndex ) { if( !GameI.IsValid() ) return; m_GItoDI[GameI.controller][GameI.button][iSlotIndex].MakeInvalid(); UpdateTempDItoGI(); }
void InputMapper::SetInputMap( DeviceInput DeviceI, GameInput GameI, int iSlotIndex ) { // remove the old input ClearFromInputMap( DeviceI ); ClearFromInputMap( GameI, iSlotIndex ); m_GItoDI[GameI.controller][GameI.button][iSlotIndex] = DeviceI; UpdateTempDItoGI(); }
void InputMapper::ClearFromInputMap( DeviceInput DeviceI ) { // search for where this DeviceI maps to for( int p=0; p<MAX_GAME_CONTROLLERS; p++ ) { for( int b=0; b<MAX_GAME_BUTTONS; b++ ) { for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ ) { if( m_GItoDI[p][b][s] == DeviceI ) m_GItoDI[p][b][s].MakeInvalid(); } } } UpdateTempDItoGI(); }
void InputMapper::ClearAllMappings() { m_mappings.Clear(); UpdateTempDItoGI(); }