driverselect.cpp: List driver type even if empty

Former-commit-id: 815c1ecedd310daa17d72b2839363f5cdd7fc1d5
Former-commit-id: 6ddcdc956d19b3cb52642a2d6fc7beaf4dab34aa
This commit is contained in:
Xavier Del Campo Romero 2024-11-09 08:20:41 +01:00
parent 67805f06dd
commit 295d66e383

View file

@ -129,6 +129,8 @@ void GfDrivers::reload()
continue; continue;
} }
_pPrivate->vecTypes.push_back(strModName);
// For each driver (= interface) "in" the module // For each driver (= interface) "in" the module
for (int nItfInd = 0; nItfInd < pCurModule->modInfoSize; nItfInd++) for (int nItfInd = 0; nItfInd < pCurModule->modInfoSize; nItfInd++)
{ {
@ -171,9 +173,7 @@ void GfDrivers::reload()
const std::pair<std::string, int> driverKey(pDriver->getModuleName(), const std::pair<std::string, int> driverKey(pDriver->getModuleName(),
pDriver->getInterfaceIndex()); pDriver->getInterfaceIndex());
_pPrivate->mapDriversByKey[driverKey] = pDriver; _pPrivate->mapDriversByKey[driverKey] = pDriver;
if (std::find(_pPrivate->vecTypes.begin(), _pPrivate->vecTypes.end(),
pDriver->getType()) == _pPrivate->vecTypes.end())
_pPrivate->vecTypes.push_back(pDriver->getType());
if (std::find(_pPrivate->vecCarCategoryIds.begin(), _pPrivate->vecCarCategoryIds.end(), if (std::find(_pPrivate->vecCarCategoryIds.begin(), _pPrivate->vecCarCategoryIds.end(),
pDriver->getCar()->getCategoryId()) == _pPrivate->vecCarCategoryIds.end()) pDriver->getCar()->getCategoryId()) == _pPrivate->vecCarCategoryIds.end())
_pPrivate->vecCarCategoryIds.push_back(pDriver->getCar()->getCategoryId()); _pPrivate->vecCarCategoryIds.push_back(pDriver->getCar()->getCategoryId());