--- 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;