void CGameUtils::GetGameClients(const ADDON::VECADDONS& addons, const CURL& translatedUrl, GameClientVector& candidates, bool& bHasVfsGameClient) { bHasVfsGameClient = false; const std::string extension = URIUtils::GetExtension(translatedUrl.Get()); const bool bIsLocalFile = (translatedUrl.GetProtocol() == "file" || translatedUrl.GetProtocol().empty()); for (auto& addon : addons) { GameClientPtr gameClient = std::static_pointer_cast<CGameClient>(addon); // Filter by extension if (!gameClient->IsExtensionValid(extension)) continue; // Filter by VFS if (!bIsLocalFile && !gameClient->SupportsVFS()) { bHasVfsGameClient = true; continue; } candidates.push_back(gameClient); } }