X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=d790c4f852c9f468bd51c39ba4a9fd1b221faa20;hb=cabbec9701799f82a1d1bde30cb6e235fe7a74a4;hp=50fccd40a095fc55d7e64c5f7b73d80b2c3c94b5;hpb=a52956be369124d7373c9be299a7c8eb9aeef60d;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 50fccd4..d790c4f 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,9 +513,13 @@ 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; - if down then KeyPress(key); end; SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP: @@ -527,7 +531,6 @@ begin e_LogWritefln('Input Debug: jbutton, joy=%s, button=%s, keycode=%s, press=%s', [ev.jbutton.which, ev.jbutton.button, key, down]); e_KeyUpDown(key, down); g_Console_ProcessBind(key, down); - if down then KeyPress(key) end else begin @@ -556,7 +559,6 @@ begin end; e_KeyUpDown(minuskey, True); g_Console_ProcessBind(minuskey, True); - KeyPress(minuskey); end else if ev.jaxis.value > JoystickZeroAxes[ev.jaxis.which, ev.jaxis.axis] + e_JoystickDeadzones[ev.jaxis.which] then begin @@ -567,7 +569,6 @@ begin end; e_KeyUpDown(key, True); g_Console_ProcessBind(key, True); - KeyPress(key); end else begin @@ -606,7 +607,6 @@ begin key := e_JoyHatToKey(ev.jhat.which, ev.jhat.hat, i); e_KeyUpDown(key, down); g_Console_ProcessBind(key, down); - if down then KeyPress(key) end end; JoystickHatState[ev.jhat.which, ev.jhat.hat] := hat @@ -789,7 +789,6 @@ var procedure ProcessLoading (forceUpdate: Boolean=false); var ev: TSDL_Event; - ID: LongWord; stt: UInt64; begin FillChar(ev, sizeof(ev), 0); @@ -826,15 +825,8 @@ begin 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(); SwapBuffers(); @@ -974,7 +966,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);