X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=8336ea9b82cb39b11cd0b5b95c8e992e8cc3b0dd;hp=3958d24d12df79b518b6dc351942a53d487acc52;hb=a9ab7bf0c72e15b932b20aad24b10db60138bb21;hpb=ec8ff55f97b6159f646c6e120a64a323d9fe8189 diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 3958d24..8336ea9 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -314,6 +314,8 @@ begin SDL_WINDOWEVENT_MINIMIZED: begin e_UnpressAllKeys(); + if (gPlayer1 <> nil) then gPlayer1.releaseAllWeaponSwitchKeys(); + if (gPlayer2 <> nil) then gPlayer2.releaseAllWeaponSwitchKeys(); if not wMinimized then begin e_ResizeWindow(0, 0); @@ -402,6 +404,8 @@ begin begin wDeactivate := true; e_UnpressAllKeys(); + if (gPlayer1 <> nil) then gPlayer1.releaseAllWeaponSwitchKeys(); + if (gPlayer2 <> nil) then gPlayer2.releaseAllWeaponSwitchKeys(); //e_WriteLog('window lost focus!', MSG_NOTIFY); end; end;