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...
gr3.6
Dimitri Stolnikov 10 years ago
parent 368c0ff130
commit 7b66bb860a
  1. 21
      lib/osmosdr_device.cc

@ -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;
}

Loading…
Cancel
Save