Commit c020394
examples/drm: Don't force
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.card{i} enumeration to start at 0
1 parent 8a5343f commit c020394
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
0 commit comments