mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
KMSDRM: fix compilation on linux, no d_namlen (Bug 4624)
This commit is contained in:
parent
d0fa93d63c
commit
5998c51324
@ -101,7 +101,11 @@ static int get_dricount(void)
|
|||||||
folder = opendir(KMSDRM_DRI_PATH);
|
folder = opendir(KMSDRM_DRI_PATH);
|
||||||
if (folder) {
|
if (folder) {
|
||||||
while ((res = readdir(folder))) {
|
while ((res = readdir(folder))) {
|
||||||
if (res->d_namlen > 4 && strncmp(res->d_name, "card", 4)) {
|
int len = 0;
|
||||||
|
if (res->d_name) {
|
||||||
|
len = SDL_strlen(res->d_name);
|
||||||
|
}
|
||||||
|
if (len > 4 && strncmp(res->d_name, "card", 4)) {
|
||||||
devcount++;
|
devcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user