hedgewars/hwengine.pas
branchhedgeroid
changeset 5932 5164d17b6374
parent 5824 2e5835130d9a
parent 5912 d31eba29e706
child 6023 a28be05b20bc
equal deleted inserted replaced
5828:667fb58d7f18 5932:5164d17b6374
   110 {$ENDIF}
   110 {$ENDIF}
   111 
   111 
   112     if flagMakeCapture then
   112     if flagMakeCapture then
   113     begin
   113     begin
   114         flagMakeCapture:= false;
   114         flagMakeCapture:= false;
       
   115         {$IFNDEF IPHONEOS}
   115         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
   116         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
   116         WriteLnToConsole('Saving ' + s + '...');
   117 
   117         playSound(sndShutter);
   118         playSound(sndShutter);
   118         {$IFNDEF IPHONEOS}MakeScreenshot(s);{$ENDIF}
   119         if not MakeScreenshot(s) then
       
   120         begin
       
   121             WriteLnToConsole('Screenshot failed.');
       
   122             AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)');
       
   123         end
       
   124         else
       
   125             WriteLnToConsole('Screenshot saved: ' + s);
       
   126         {$ENDIF}
   119     end;
   127     end;
   120 end;
   128 end;
   121 
   129 
   122 ////////////////////
   130 ////////////////////
   123 procedure OnDestroy;
   131 procedure OnDestroy;
   206             cScreenWidth:= cNewScreenWidth;
   214             cScreenWidth:= cNewScreenWidth;
   207             cScreenHeight:= cNewScreenHeight;
   215             cScreenHeight:= cNewScreenHeight;
   208 
   216 
   209             ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   217             ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   210             WriteLnToConsole('window resize: ' + IntToStr(cScreenWidth) + ' x ' + IntToStr(cScreenHeight));
   218             WriteLnToConsole('window resize: ' + IntToStr(cScreenWidth) + ' x ' + IntToStr(cScreenHeight));
       
   219             ScriptOnScreenResize();
   211             InitCameraBorders()
   220             InitCameraBorders()
   212             end;
   221             end;
   213 
   222 
   214         if isTerminated = false then
   223         if isTerminated = false then
   215         begin
   224         begin