In the below snippet, the giiQueryDeviceInfo call fails for some devices. Seems connected to when there are multiple sources hooked up to a stem.
(the requested devinfo is provided by the iterator, so the failing call is redundant, but that's beside the point...)
struct gg_stem stem;
struct gii_source_iter src;
struct gii_device_iter dev;
struct gii_cmddata_devinfo di;
...
giiIterFillSources(&src, stem);
giiIterSources(&src);
GG_ITER_FOREACH(&src) {
giiIterFillDevices(&dev, stem,
src.src, src.origin);
giiIterDevices(&dev);
GG_ITER_FOREACH(&dev) {
if (giiQueryDeviceInfo(stem, dev.origin, &di))
printf("no device 0x%x\n", dev.origin);
}
}
When I have device origins 0x101, 0x102 and 0x201, the call fails for all but 0x201.
Logged In: YES
user_id=972775
Originator: YES
fixed by gii/gii.c r1.72