diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index de0bc1cbc..76097a8e4 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2319,6 +2319,10 @@ SDL_CreateWindowFramebuffer(SDL_Window * window) return NULL; } + if (window->surface) { + return window->surface; + } + if (!SDL_PixelFormatEnumToMasks(format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { return NULL; }