From 9fae8f7088efab699fcec3e8086db5f40c899314 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 29 Aug 2021 15:33:58 -0400 Subject: [PATCH] Treat empty SDL_VIDEODRIVER var to check all video drivers. --- src/video/SDL_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 160190da9..07c7aa5ea 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -489,7 +489,7 @@ SDL_VideoInit(const char *driver_name) if (driver_name == NULL) { driver_name = SDL_getenv("SDL_VIDEODRIVER"); } - if (driver_name != NULL) { + if (driver_name != NULL && *driver_name != 0) { const char *driver_attempt = driver_name; while(driver_attempt != NULL && *driver_attempt != 0 && video == NULL) { const char* driver_attempt_end = SDL_strchr(driver_attempt, ',');