devices: software-only sources should be appended at the very end

hopefully this will result in hardware sources to be shown first
if any sort of a graphical interface is being used to show a list...
This commit is contained in:
Dimitri Stolnikov 2013-04-10 21:17:31 +02:00
parent 368c0ff130
commit 7b66bb860a
1 changed files with 13 additions and 8 deletions

View File

@ -121,18 +121,10 @@ devices_t device::find(const device_t &hint)
BOOST_FOREACH( std::string dev, fcd_source::get_devices() )
devices.push_back( device_t(dev) );
#endif
#ifdef ENABLE_FILE
BOOST_FOREACH( std::string dev, file_source_c::get_devices() )
devices.push_back( device_t(dev) );
#endif
#ifdef ENABLE_RTL
BOOST_FOREACH( std::string dev, rtl_source_c::get_devices() )
devices.push_back( device_t(dev) );
#endif
#ifdef ENABLE_RTL_TCP
BOOST_FOREACH( std::string dev, rtl_tcp_source_c::get_devices() )
devices.push_back( device_t(dev) );
#endif
#ifdef ENABLE_UHD
BOOST_FOREACH( std::string dev, uhd_source_c::get_devices() )
devices.push_back( device_t(dev) );
@ -146,5 +138,18 @@ devices_t device::find(const device_t &hint)
devices.push_back( device_t(dev) );
#endif
/* software-only sources should be appended at the very end,
* hopefully resulting in hardware sources to be shown first
* in a graphical interface etc... */
#ifdef ENABLE_RTL_TCP
BOOST_FOREACH( std::string dev, rtl_tcp_source_c::get_devices() )
devices.push_back( device_t(dev) );
#endif
#ifdef ENABLE_FILE
BOOST_FOREACH( std::string dev, file_source_c::get_devices() )
devices.push_back( device_t(dev) );
#endif
return devices;
}