Commit Graph

1 Commits

Author SHA1 Message Date
Ian Mullins
3567682ae7 Fix assumption that DRI_DEVNAME begins at 0
The existing logic of the code was to count every possible entry in
KMSDRM_DRI_PATH. After this a for loop would start trying to open
filename0, filename1, filename2, etc. In recent Linux kernels (say
5.18) with simpledrm, the lowest KMSDRM_DRI_DEVNAME is often
/dev/dri/card1, rather than /dev/dri/card0, causing the code to fail
once /dev/dri/card0 has failed to open. Running:

modprobe foodrm && modprobe bardrm && rmmod foodrm

before you try to run an application with SDL KMSDRM would have also
made this fail.

Fix assumption that DRI_DEVNAME begins at 0

Additional changes to SDL2-2.0.22-fix-dri-assumption.patch

Retesting zuul build
2022-07-13 10:37:40 +01:00