From 613ce7850e579b628361a2692e21e9aa33889b22 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 26 Jul 2022 13:34:27 -0700 Subject: [PATCH] Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0 --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index b66e71538..92ecc2d90 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -80,7 +80,7 @@ get_driindex(void) const char *hint; hint = SDL_GetHint(SDL_HINT_KMSDRM_DEVICE_INDEX); - if (hint) { + if (hint && *hint) { const int idx = SDL_atoi(hint); if (idx >= 0) { return idx; /* we'll take the user's request here. */