hedgewars/hwengine.dpr
changeset 1121 d595dc56b4f3
parent 1120 eb5a9f86f9c6
child 1127 7e1b94a0fc1f
equal deleted inserted replaced
1120:eb5a9f86f9c6 1121:d595dc56b4f3
   154 while SDL_PollEvent(@event) <> 0 do
   154 while SDL_PollEvent(@event) <> 0 do
   155 	case event.type_ of
   155 	case event.type_ of
   156 		SDL_KEYDOWN: if GameState = gsChat then KeyPressChat(event.key.keysym.unicode);
   156 		SDL_KEYDOWN: if GameState = gsChat then KeyPressChat(event.key.keysym.unicode);
   157 		SDL_ACTIVEEVENT: if (event.active.state and SDL_APPINPUTFOCUS) <> 0 then
   157 		SDL_ACTIVEEVENT: if (event.active.state and SDL_APPINPUTFOCUS) <> 0 then
   158 				cHasFocus:= event.active.gain = 1;
   158 				cHasFocus:= event.active.gain = 1;
   159 		SDL_VIDEORESIZE: Resize(max(event.resize.w, 320), max(event.resize.h, 240));
   159 		SDL_VIDEORESIZE: Resize(max(event.resize.w, 600), max(event.resize.h, 450));
   160 		SDL_QUITEV: isTerminated:= true
   160 		SDL_QUITEV: isTerminated:= true
   161 		end;
   161 		end;
   162 CurrTime:= SDL_GetTicks;
   162 CurrTime:= SDL_GetTicks;
   163 if PrevTime + cTimerInterval <= CurrTime then
   163 if PrevTime + cTimerInterval <= CurrTime then
   164    begin
   164    begin
   185 
   185 
   186 case ParamCount of
   186 case ParamCount of
   187 14: begin
   187 14: begin
   188      val(ParamStr(2), cScreenWidth);
   188      val(ParamStr(2), cScreenWidth);
   189      val(ParamStr(3), cScreenHeight);
   189      val(ParamStr(3), cScreenHeight);
       
   190      cInitWidth:= cScreenWidth;
       
   191      cInitHeight:= cScreenHeight;
   190      cBitsStr:= ParamStr(4);
   192      cBitsStr:= ParamStr(4);
   191      val(cBitsStr, cBits);
   193      val(cBitsStr, cBits);
   192      val(ParamStr(5), ipcPort);
   194      val(ParamStr(5), ipcPort);
   193      cFullScreen:= ParamStr(6) = '1';
   195      cFullScreen:= ParamStr(6) = '1';
   194      isSoundEnabled:= ParamStr(7) = '1';
   196      isSoundEnabled:= ParamStr(7) = '1';