SDL: Don't try to save and restore EGL context on Vulkan windows on Android

From 5e2f8adce9ae7e297168812442dd04c96a21b367 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 11 Sep 2026 13:19:36 -0700
Subject: [PATCH] Don't try to save and restore EGL context on Vulkan windows
 on Android

---
 src/video/android/SDL_androidevents.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/android/SDL_androidevents.c b/src/video/android/SDL_androidevents.c
index cddc1bff7e7a1..f65d7cad11680 100644
--- a/src/video/android/SDL_androidevents.c
+++ b/src/video/android/SDL_androidevents.c
@@ -35,7 +35,7 @@
 #ifdef SDL_VIDEO_OPENGL_EGL
 static void android_egl_context_restore(SDL_Window *window)
 {
-    if (window) {
+    if (window && (window->flags & SDL_WINDOW_OPENGL)) {
         SDL_WindowData *data = window->internal;
         SDL_GL_MakeCurrent(window, NULL);
         if (!SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context)) {
@@ -56,7 +56,7 @@ static void android_egl_context_restore(SDL_Window *window)
 
 static void android_egl_context_backup(SDL_Window *window)
 {
-    if (window) {
+    if (window && (window->flags & SDL_WINDOW_OPENGL)) {
         int interval = 0;
         // Keep a copy of the EGL Context so we can try to restore it when we resume
         SDL_WindowData *data = window->internal;