X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=992d6dc4c7091de9906f6f9808ef695c7553542c;hp=31c5b1cde5c4147282cd52211f24446cd9a47e12;hb=7c06a96f799350b246c7ed39d30c2a08237edee5;hpb=be2ad7bf5e09b4ee91a0c5ee741503ace8c7887c diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index 31c5b1c..992d6dc 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -107,7 +107,13 @@ implementation // store real window size in gWinSize, downscale resolution now w := round(w / r_pixel_scale); h := round(h / r_pixel_scale); - e_ResizeFramebuffer(w, h); + if not e_ResizeFramebuffer(w, h) then + begin + e_LogWriteln('GL: could not create framebuffer, falling back to --no-fbo'); + glRenderToFBO := False; + w := gWinSizeX; + h := gWinSizeY; + end; end; gScreenWidth := w; gScreenHeight := h;