X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=b8d0921b589b98eb4190e598cd1f8ea32766a41f;hb=fe124e7198cf5515dc005ed363c7989e19228134;hp=df44683f8276c42d790daa11396ed1d141f32a33;hpb=4de34c0c003869d8f125768be330702020f3c514;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index df44683..b8d0921 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -61,7 +61,7 @@ uses g_console, e_input, g_options, g_game, g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net, g_map, g_gfx, g_monsters, xprofiler, - g_touch; + g_touch, g_gui; const @@ -513,7 +513,12 @@ begin if g_dbg_input then e_LogWritefln('Input Debug: keysym, press=%s, scancode=%s', [down, key]); e_KeyUpDown(key, down); - g_Console_ProcessBind(key, down) + g_Console_ProcessBind(key, down); + end + else if gConsoleShow or gChatShow or (g_ActiveWindow <> nil) then + begin + // key repeat in menus and shit + KeyPress(key); end; end; @@ -784,7 +789,6 @@ var procedure ProcessLoading (forceUpdate: Boolean=false); var ev: TSDL_Event; - ID: LongWord; stt: UInt64; begin FillChar(ev, sizeof(ev), 0); @@ -819,21 +823,17 @@ begin end; end; +{$IFNDEF HEADLESS} if forceUpdate then begin - if g_Texture_Get('INTER', ID) then - begin - e_DrawSize(ID, 0, 0, 0, false, false, gScreenWidth, gScreenHeight); - e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150); - end - else - begin - e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0); - end; + DrawMenuBackground('INTER'); + e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150); DrawLoadingStat(); + g_Console_Draw(True); SwapBuffers(); end; +{$ENDIF} end; e_SoundUpdate(); @@ -903,6 +903,8 @@ begin else if (NetMode = NET_CLIENT) then g_Net_Client_Update(); end; + if NetMode = NET_SERVER then g_Net_Flush(); + g_Map_ProfilersEnd(); g_Mons_ProfilersEnd(); @@ -969,7 +971,7 @@ begin {$IFDEF USE_GLES1} SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); {$ELSE} SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); @@ -1177,8 +1179,10 @@ begin // Êîìàíäíàÿ ñòðîêà if (ParamCount > 0) then g_Game_Process_Params(); +{$IFNDEF HEADLESS} // Çàïðîñ ÿçûêà if (not gGameOn) and gAskLanguage then g_Menu_AskLanguage(); +{$ENDIF} e_WriteLog('Entering the main loop', TMsgType.Notify);