devices = sr_device_list();
for (l = devices; l; l = l->next) {
d = l->data;
- if (strstr(d->plugin->name, "demo"))
+ if (sr_device_has_hwcap(d, SR_HWCAP_DEMO_DEVICE))
continue;
if (device_cnt == device_num) {
if (device_num == device_cnt) {
demo_device = NULL;
for (l = devices; l; l = l->next) {
device = l->data;
- if (strstr(device->plugin->name, "demo")) {
+ if (sr_device_has_hwcap(device, SR_HWCAP_DEMO_DEVICE)) {
demo_device = device;
continue;
}
devices = sr_device_list();
for (l = devices; l; l = l->next) {
device = l->data;
- if (!strstr(device->plugin->name, "demo"))
+ if (!sr_device_has_hwcap(device, SR_HWCAP_DEMO_DEVICE))
num_devices++;
}