hedgewars/hwengine.pas
changeset 5912 d31eba29e706
parent 5825 a6eab1b7c00d
child 5932 5164d17b6374
child 5968 4e8bb227be9a
equal deleted inserted replaced
5911:4a28d0ae9624 5912:d31eba29e706
   109 {$ENDIF}
   109 {$ENDIF}
   110 
   110 
   111     if flagMakeCapture then
   111     if flagMakeCapture then
   112     begin
   112     begin
   113         flagMakeCapture:= false;
   113         flagMakeCapture:= false;
       
   114         {$IFNDEF IPHONEOS}
   114         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
   115         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
   115         WriteLnToConsole('Saving ' + s + '...');
   116 
   116         playSound(sndShutter);
   117         playSound(sndShutter);
   117         {$IFNDEF IPHONEOS}MakeScreenshot(s);{$ENDIF}
   118         if not MakeScreenshot(s) then
       
   119         begin
       
   120             WriteLnToConsole('Screenshot failed.');
       
   121             AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)');
       
   122         end
       
   123         else
       
   124             WriteLnToConsole('Screenshot saved: ' + s);
       
   125         {$ENDIF}
   118     end;
   126     end;
   119 end;
   127 end;
   120 
   128 
   121 ////////////////////
   129 ////////////////////
   122 procedure OnDestroy;
   130 procedure OnDestroy;