tslib icon indicating copy to clipboard operation
tslib copied to clipboard

Return the correct name during a device scan

Open kreijack opened this issue 11 months ago • 0 comments

In scan_device(), the returned device name was computed wrongly. It is opened a device, then if it was found as touchscreen it is computed the name again in a different way. It is better (and simpler) to return a strdup() of the last successfully opened device.

I suspect that in may setup I faced the bug because I have a number of entries > 9 and this create an arrangement of entries where

      snprintf(fname, sizeof(fname),
                         "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
      sprintf(filename, "%s/%s%d",
                         DEV_INPUT_EVENT, EVENT_DEV_NAME,
                         i);
    fname <> filename

kreijack avatar Mar 04 '24 19:03 kreijack