hedgewars/hwengine.pas
branchhedgeroid
changeset 5932 5164d17b6374
parent 5824 2e5835130d9a
parent 5912 d31eba29e706
child 6023 a28be05b20bc
--- a/hedgewars/hwengine.pas	Fri Sep 16 17:36:05 2011 +0200
+++ b/hedgewars/hwengine.pas	Fri Sep 16 18:17:16 2011 +0200
@@ -112,10 +112,18 @@
     if flagMakeCapture then
     begin
         flagMakeCapture:= false;
+        {$IFNDEF IPHONEOS}
         s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
-        WriteLnToConsole('Saving ' + s + '...');
+
         playSound(sndShutter);
-        {$IFNDEF IPHONEOS}MakeScreenshot(s);{$ENDIF}
+        if not MakeScreenshot(s) then
+        begin
+            WriteLnToConsole('Screenshot failed.');
+            AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)');
+        end
+        else
+            WriteLnToConsole('Screenshot saved: ' + s);
+        {$ENDIF}
     end;
 end;
 
@@ -208,6 +216,7 @@
 
             ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
             WriteLnToConsole('window resize: ' + IntToStr(cScreenWidth) + ' x ' + IntToStr(cScreenHeight));
+            ScriptOnScreenResize();
             InitCameraBorders()
             end;