X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_window.pas;h=0ac570dad8b00a296278d4e0163f19ee28785b72;hb=923fa980434e55419f35422119af2faae2bf68d7;hp=17aa0479563d2239f9a3db5305b5b44a07fad5f9;hpb=d46592a9a1b2cb649e26f30e54622708334b5061;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 17aa047..0ac570d 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -452,16 +452,19 @@ begin kbev.sym := ev.key.keysym.sym; kbev.bstate := curMsButState; kbev.kstate := curKbState; + {$IF not DEFINED(HEADLESS)} if g_Holmes_keyEvent(kbev) then begin if (ev.type_ <> SDL_KEYDOWN) then e_KeyUpDown(ev.key.keysym.scancode, false); exit; end; + {$ENDIF} end; if (ev.type_ = SDL_KEYDOWN) then KeyPress(key); e_KeyUpDown(ev.key.keysym.scancode, (ev.type_ = SDL_KEYDOWN)); end; + {$IF not DEFINED(HEADLESS)} SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP: begin msev.dx := ev.button.x-curMsX; @@ -475,7 +478,7 @@ begin if (msev.but <> 0) then begin // ev.button.clicks: Byte - curMsButState := curMsButState or msev.but; + if (ev.type_ = SDL_MOUSEBUTTONDOWN) then curMsButState := curMsButState or msev.but else curMsButState := curMsButState and (not msev.but); msev.bstate := curMsButState; msev.kstate := curKbState; if (g_holmes_enabled) then g_Holmes_mouseEvent(msev); @@ -510,6 +513,7 @@ begin msev.kstate := curKbState; if (g_holmes_enabled) then g_Holmes_mouseEvent(msev); end; + {$ENDIF} SDL_TEXTINPUT: begin