|
@@ -69,13 +69,17 @@ Android_CreateWindow(_THIS, SDL_Window * window)
|
|
|
SDL_free(data);
|
|
|
return SDL_SetError("Could not fetch native window");
|
|
|
}
|
|
|
-
|
|
|
- data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->native_window);
|
|
|
|
|
|
- if (data->egl_surface == EGL_NO_SURFACE) {
|
|
|
- ANativeWindow_release(data->native_window);
|
|
|
- SDL_free(data);
|
|
|
- return SDL_SetError("Could not create GLES window surface");
|
|
|
+ /* Do not create EGLSurface for Vulkan window since it will then make the window
|
|
|
+ incompatible with vkCreateAndroidSurfaceKHR */
|
|
|
+ if ((window->flags & SDL_WINDOW_VULKAN) == 0) {
|
|
|
+ data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->native_window);
|
|
|
+
|
|
|
+ if (data->egl_surface == EGL_NO_SURFACE) {
|
|
|
+ ANativeWindow_release(data->native_window);
|
|
|
+ SDL_free(data);
|
|
|
+ return SDL_SetError("Could not create GLES window surface");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
window->driverdata = data;
|