/** @brief Get the index of next available Kinect device @return -1 when no available */ int KinectContext::GetNextAvailableIndex() { int size = GetActiveCount(); for(int i = 0; i < size; i++){ if(!IsConnected(i)){ return i; } } return -1; }
void CTransfers::OnCheckExit() { if ( GetCount() == 0 && Downloads.GetCount() == 0 ) m_bThread = FALSE; if ( Settings.Live.AutoClose && GetActiveCount() == 0 ) { CSingleLock pLock( &theApp.m_pSection ); if ( pLock.Lock( 250 ) ) { if ( CWnd* pWnd = (CWnd*)theApp.SafeMainWnd() ) { Settings.Live.AutoClose = FALSE; pWnd->PostMessage( WM_CLOSE ); } } } }
/** @brief Get the number of available (active but not connected) Kinect sensor @return number */ int KinectContext::GetAvailableCount() { return (GetActiveCount() - GetConnectedCount()); }