From 87eb734c4e2f0b846948e53bf7756bdcad7c740f Mon Sep 17 00:00:00 2001 From: Manuel Alfayate Corchete Date: Mon, 11 Jan 2021 23:59:40 +0100 Subject: [PATCH] [KMS/DRM] Don't ask SDL to scale image when in Vulkan mode. --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 081790676..b65b96279 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -1099,6 +1099,11 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) if ((ret = KMSDRM_CreateSurfaces(_this, window))) { goto cleanup; } + + /* Tell app about the size we have determined for the window, + so SDL pre-scales to that size for us. */ + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, + windata->surface_w, windata->surface_h); } /* Add window to the internal list of tracked windows. Note, while it may @@ -1125,11 +1130,6 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window) SDL_SetMouseFocus(window); SDL_SetKeyboardFocus(window); - /* Tell app about the size we have determined for the window, - so SDL pre-scales to that size for us. */ - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, - windata->surface_w, windata->surface_h); - /***********************************************************/ /* Tell SDL that the mouse has entered the window using an */ /* artificial event: we have no windowing system to tell */ @@ -1199,7 +1199,7 @@ KMSDRM_ReconfigureWindow( _THIS, SDL_Window * window) { /* Tell app about the size we have determined for the window, so SDL pre-scales to that size for us. */ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, - windata->surface_w, windata->surface_h); + windata->surface_w, windata->surface_h); } int