|
@@ -5,7 +5,7 @@ unit UCommandline;
|
|
|
|
|
|
interface
|
|
|
|
|
|
-uses classes, LazpaintType, uresourcestrings;
|
|
|
+uses classes, LazpaintType, uresourcestrings, LCLStrConsts;
|
|
|
|
|
|
{$IFDEF WINDOWS}
|
|
|
{$DEFINE SHOW_MANUAL_IN_WINDOW}
|
|
@@ -237,6 +237,13 @@ var
|
|
|
errorEncountered := true;
|
|
|
exit(false);
|
|
|
end;
|
|
|
+ if (screenIndex < 0) or (screenIndex >= Screen.MonitorCount) then
|
|
|
+ begin
|
|
|
+ instance.ShowError('Screenshot', '"Screenshot" ' +
|
|
|
+ lclstrconsts.rsListIndexExceedsBounds.Replace('%d', inttostr(screenIndex)));
|
|
|
+ errorEncountered := true;
|
|
|
+ exit(false);
|
|
|
+ end;
|
|
|
r := Screen.Monitors[screenIndex].BoundsRect;
|
|
|
r := rect(r.Left*CanvasScale, r.Top*CanvasScale,
|
|
|
r.Right*CanvasScale, r.Bottom*CanvasScale);
|