void CGNetUpdater::UpdateGame(IGame *p, bool bSuccess) { try { if(bSuccess) { #ifndef _DEBUG BSTR _bstr; if(SUCCEEDED(p->get_Name(&_bstr) || _bstr_t(_bstr) == _bstr_t("Falcon4"))) #endif { p->AddRef(); m_arrGames.push_back(p); if(FilterGame(p)) { MakeServerItem(m_pListServers, p); m_pListServers->ReorderBranch(m_pListServers->GetRoot()); m_pListServers->RecalcSize(); m_pListServers->Parent_->RefreshClient(m_pListServers->GetClient()); } } } m_nUpdatedServers++; UpdateServerStatus(); } catch(_com_error e) { MonoPrint("CGNetUpdater::Refresh - _com_error 0x%X", e.Error()); } }
void c_fbaRL::InitFilterList() { bProcessingGames = true; nBurnSelected = -1; nSelectedGame = 0; nGameListTop = 0; nFilteredGames = 0; fgames = (c_game**)malloc(sizeof(c_game) * MAX_GAMES); //memset(fgames, 0, sizeof(c_game) * MAX_GAMES); // process... for(int n=0; n < nTotalGames; n++) { if(!g_opt_bDisplayMissingGames && !games[n]->bAvailable) { continue; } if(FilterGame(games[n]->sysmask) == false) { continue; } fgames[nFilteredGames] = new c_game(nFilteredGames); strcpy(fgames[nFilteredGames]->path , games[n]->path); strcpy(fgames[nFilteredGames]->zipname , games[n]->zipname); strcpy(fgames[nFilteredGames]->title , games[n]->title); strcpy(fgames[nFilteredGames]->sysmask , games[n]->sysmask); memcpy(&fgames[nFilteredGames]->nSize , &games[n]->nSize, sizeof(uint64_t)); memcpy(&fgames[nFilteredGames]->bAvailable , &games[n]->bAvailable, sizeof(bool)); nFilteredGames++; } if(nFilteredGames < 1) { bProcessingGames = false; ResetPreviewImage(); return; } // Sort Filtered list by Title qsort(fgames, nFilteredGames, sizeof(c_game*), _FcCompareStruct); bProcessingGames = false; nStatus = STATUS_UPDATEPREVIEW; }
static void UpdateDisplay() { try { // Delete all items m_pListServers->DeleteBranch(m_pListServers->GetRoot()); GAMEARRAY::iterator it; GNETCORELib::IGamePtr p; for(it = m_arrGames.begin(); it != m_arrGames.end(); it++) if(FilterGame(*it)) MakeServerItem(m_pListServers, *it); m_pListServers->ReorderBranch(m_pListServers->GetRoot()); m_pListServers->RecalcSize(); m_pListServers->Parent_->RefreshClient(m_pListServers->GetClient()); } catch(_com_error e) { MonoPrint("UpdateDisplay - _com_error 0x%X", e.Error()); } }