X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=3d9753377d8fc65d01eabec01fb77a39cfc5c60a;hb=f2421615862d0a6c093c6fc3117849010d26557b;hp=8336ea9b82cb39b11cd0b5b95c8e992e8cc3b0dd;hpb=dc74c1c884773d0133ab79bcaa29b309c85d2603;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 8336ea9..3d97533 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -314,8 +314,6 @@ 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); @@ -404,8 +402,6 @@ 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; @@ -834,10 +830,10 @@ end; procedure InitOpenGL (); begin {$IF not DEFINED(HEADLESS)} - {$IFDEF USE_GLES1} + {$IF DEFINED(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);