]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/connect.cpp
Adapt to config key capabilities.
[pulseview.git] / pv / dialogs / connect.cpp
index c5535d87fa3b53dcc2662e29f149eb64b8f6b6a0..1156d6f5c87b2e79993f6cea7426e8411adc51e4 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <cassert>
+
 #include <libsigrok/libsigrok.h>
 
 #include "connect.h"
@@ -32,8 +34,8 @@ extern "C" {
 #include <libsigrok/libsigrok.h>
 }
 
-using boost::shared_ptr;
 using std::list;
+using std::shared_ptr;
 using std::string;
 
 extern sr_context *sr_ctx;
@@ -117,7 +119,7 @@ void Connect::populate_drivers()
                        hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_opts,
                                        &num_opts, sizeof(int32_t));
                        for (unsigned int j = 0; j < num_opts; j++)
-                               if (hwopts[j] == SR_CONF_SAMPLERATE) {
+                               if ((hwopts[j] & SR_CONF_MASK) == SR_CONF_SAMPLERATE) {
                                        supported_device = true;
                                        break;
                                }