SDL: Merge commit 'c35e71892e6aa7dc2ce697b9ac44e541b3f4caef' into main

From c35e71892e6aa7dc2ce697b9ac44e541b3f4caef Mon Sep 17 00:00:00 2001
From: vanfanel <[EMAIL REDACTED]>
Date: Thu, 18 Mar 2021 11:47:23 +0100
Subject: [PATCH] [KMSDRM] All non-vulkan windows have to be marked as OPENGL,
 not only the first created one.

---
 src/video/kmsdrm/SDL_kmsdrmvideo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index f2979bad7..ef3568a10 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -1158,6 +1158,10 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
 
     if (!is_vulkan && !vulkan_mode) { /* NON-Vulkan block. */
 
+        /* Maybe you didn't ask for an OPENGL window, but that's what you will get.
+           See following comments on why. */
+        window->flags |= SDL_WINDOW_OPENGL;
+
         if (!(viddata->gbm_init)) {
 
             /* After SDL_CreateWindow, most SDL2 programs will do SDL_CreateRenderer(),
@@ -1173,10 +1177,6 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
                to find out why!
              */
 
-            /* Maybe you didn't ask for an OPENGL window, but that's what you will get.
-               See previous comment on why. */
-            window->flags |= SDL_WINDOW_OPENGL;
-
             /* Reopen FD, create gbm dev, setup display plane, etc,.
                but only when we come here for the first time,
                and only if it's not a VK window. */