From 1a007ab88d405e14c3b5c726e55c61d503d9c7fc Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 28 Aug 2024 16:30:21 -0700
Subject: [PATCH] Fixed SDL_GetDisplayIndex()
---
src/video/SDL_video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index dac0b0e829b41..f28abf80bbd6c 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -950,7 +950,8 @@ int SDL_GetDisplayIndex(SDL_DisplayID displayID)
int display_index;
if (!_this) {
- return SDL_UninitializedVideo();
+ SDL_UninitializedVideo();
+ return -1;
}
for (display_index = 0; display_index < _this->num_displays; ++display_index) {