647 | | // first map the devices to a position using the device spec strings |
---|
648 | | std::map<fb_octlet_t, int> positionMap; |
---|
649 | | for ( FFADODeviceVectorIterator it = m_avDevices.begin(); |
---|
650 | | it != m_avDevices.end(); |
---|
651 | | ++it ) |
---|
652 | | { |
---|
653 | | int pos = m_deviceStringParser->matchPosition((*it)->getConfigRom()); |
---|
654 | | fb_octlet_t guid = (*it)->getConfigRom().getGuid(); |
---|
655 | | positionMap[guid] = pos; |
---|
656 | | debugOutput( DEBUG_LEVEL_VERBOSE, "Mapping %s to position %d...\n", (*it)->getConfigRom().getGuidString().c_str(), pos ); |
---|
657 | | } |
---|
658 | | |
---|
659 | | // now run over all positions, and add the devices that belong to it |
---|
660 | | FFADODeviceVector sorted; |
---|
661 | | int nbPositions = m_deviceStringParser->countDeviceStrings(); |
---|
669 | | if(positionMap[guid] == i) { |
---|
670 | | sorted.push_back(*it); |
---|
| 657 | positionMap[guid] = pos; |
---|
| 658 | debugOutput( DEBUG_LEVEL_VERBOSE, "Mapping %s to position %d...\n", (*it)->getConfigRom().getGuidString().c_str(), pos ); |
---|
| 659 | } |
---|
| 660 | |
---|
| 661 | // now run over all positions, and add the devices that belong to it |
---|
| 662 | FFADODeviceVector sorted; |
---|
| 663 | int nbPositions = m_deviceStringParser->countDeviceStrings(); |
---|
| 664 | for (i=0; i < nbPositions; i++) { |
---|
| 665 | for ( FFADODeviceVectorIterator it = m_avDevices.begin(); |
---|
| 666 | it != m_avDevices.end(); |
---|
| 667 | ++it ) |
---|
| 668 | { |
---|
| 669 | fb_octlet_t guid = (*it)->getConfigRom().getGuid(); |
---|
| 670 | if(positionMap[guid] == i) { |
---|
| 671 | sorted.push_back(*it); |
---|
| 672 | } |
---|