Browse Source

Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0

Sam Lantinga 3 years ago
parent
commit
613ce7850e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/video/kmsdrm/SDL_kmsdrmvideo.c

+ 1 - 1
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. */