Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/drm: Don't force
card{i}
enumeration to start at 0
On my setup with an AMD RX6800XT GPU (same happens with an Intel Arc GPU) there is only `card1` and `renderD128`. The example would fail with a "File not found" error for `/dev/dri/card0` when it should instead continue to iterate to find the first valid DRM device. A more future-proof solution would be to replace the `0..10` range with a `readdir()`-like iterator over the contents of `/dev/dri` if that's accepted for an example.
- Loading branch information