QNX: Fix EGL surface creation/destruction bugs. (#16310)

This commit is contained in:
eleir9268
2026-09-13 12:08:39 -04:00
committed by GitHub
parent dc7ad197c8
commit 31cd707935
2 changed files with 2 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ bool QNX_GLES_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window)
if (surface == EGL_NO_SURFACE) {
return false;
}
SDL_SetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_QNX_SURFACE_POINTER, surface);
if (!SDL_EGL_MakeCurrent(_this, surface, impl->context)) {
return false;

View File

@@ -547,6 +547,7 @@ static void QNX_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
SDL_WindowData *impl = (SDL_WindowData *)window->internal;
if (impl) {
SDL_EGL_DestroySurface(_this, impl->egl_surface);
screen_destroy_window(impl->window);
window->internal = NULL;
}