Skip to content

Commit

Permalink
Surfaces have to be recreated immediately from KMSDRM_SetDisplayMode().
Browse files Browse the repository at this point in the history
  • Loading branch information
vanfanel committed Jul 19, 2020
1 parent b6a818b commit 3a1d7d9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -758,15 +758,10 @@ KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
SDL_Window *window = viddata->windows[i];
SDL_WindowData *windata = (SDL_WindowData *)window->driverdata;

#if SDL_VIDEO_OPENGL_EGL
/* Can't recreate EGL surfaces right now, need to wait until SwapWindow
so the correct thread-local surface and context state are available */
windata->egl_surface_dirty = SDL_TRUE;
#else
/* Re-create GBM and EGL surfaces everytime we change the display mode. */
if (KMSDRM_CreateSurfaces(_this, window)) {
return -1;
}
#endif

/* Tell app about the resize */
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, mode->w, mode->h);
Expand Down

0 comments on commit 3a1d7d9

Please sign in to comment.