mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 14:29:14 +08:00
video, dos: silence -Wdangling-pointer warnings
This commit is contained in:
@@ -70,11 +70,11 @@ static bool DOSVESA_CreateWindow(SDL_VideoDevice *device, SDL_Window *window, SD
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_DisplayMode *mode = NULL;
|
SDL_DisplayMode *mode = NULL;
|
||||||
|
SDL_DisplayMode closest;
|
||||||
if (window->requested_fullscreen_mode.internal) {
|
if (window->requested_fullscreen_mode.internal) {
|
||||||
// App explicitly set a fullscreen mode.
|
// App explicitly set a fullscreen mode.
|
||||||
mode = &window->requested_fullscreen_mode;
|
mode = &window->requested_fullscreen_mode;
|
||||||
} else if (window->floating.w > 0 && window->floating.h > 0) {
|
} 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)) {
|
if (SDL_GetClosestFullscreenDisplayMode(display->id, window->floating.w, window->floating.h, 0.0f, false, &closest)) {
|
||||||
mode = &closest;
|
mode = &closest;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user