X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl%2Fg_system.pas;h=1f4061abf7fdc4ba9ff74475e09d7ece908356e1;hb=dac16ad95bb1fcf32130e3d6f7a301e63ba85ab0;hp=7593b02398811605b2981aed31267e8760e8a20c;hpb=c3750b33c7c32ef74637ae0f6be98974af391ab9;p=d2df-sdl.git diff --git a/src/game/sdl/g_system.pas b/src/game/sdl/g_system.pas index 7593b02..1f4061a 100644 --- a/src/game/sdl/g_system.pas +++ b/src/game/sdl/g_system.pas @@ -103,7 +103,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; @@ -167,8 +173,6 @@ implementation procedure sys_Repaint; begin - if glRenderToFBO then - e_BlitFramebuffer(gWinSizeX, gWinSizeY); SDL_GL_SwapBuffers end; @@ -445,9 +449,9 @@ implementation e_KeyUpDown(key, down); g_Console_ProcessBind(key, down); end - else if gConsoleShow or gChatShow or (g_ActiveWindow <> nil) then + else begin - KeyPress(key) // key repeat in menus and shit + g_Console_ProcessBindRepeat(key) end; if down and IsValid1251(ev.keysym.unicode) and IsPrintable1251(ch) then CharPress(ch)