From 3308183dfaedceb7cabb861d6ddb1bbc528d6cca Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 27 Apr 2026 05:30:14 +0300
Subject: [PATCH] video, dos: silence -Wdangling-pointer warnings
---
src/video/dos/SDL_dosvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video/dos/SDL_dosvideo.c b/src/video/dos/SDL_dosvideo.c
index 59043bb76e3e2..387a33360c1cf 100644
--- a/src/video/dos/SDL_dosvideo.c
+++ b/src/video/dos/SDL_dosvideo.c
@@ -70,11 +70,11 @@ static bool DOSVESA_CreateWindow(SDL_VideoDevice *device, SDL_Window *window, SD
}
SDL_DisplayMode *mode = NULL;
+ SDL_DisplayMode closest;
if (window->requested_fullscreen_mode.internal) {
// App explicitly set a fullscreen mode.
mode = &window->requested_fullscreen_mode;
} else if (window->floating.w > 0 && window->floating.h > 0) {
- SDL_DisplayMode closest;
if (SDL_GetClosestFullscreenDisplayMode(display->id, window->floating.w, window->floating.h, 0.0f, false, &closest)) {
mode = &closest;
}