diff --git a/files/capture.lua b/files/capture.lua index 5ad0b49..be24578 100644 --- a/files/capture.lua +++ b/files/capture.lua @@ -770,10 +770,11 @@ function Capture:StartCapturing() self:StartCapturingAreaScan(topLeft, bottomRight, captureGridSize, outputPixelScale, captureDelay) else + ---@type fun():Vec2, Vec2 local predefinedAreaFunction = Config.CaptureArea[area] if predefinedAreaFunction then - local predefinedArea = predefinedAreaFunction() - self:StartCapturingAreaScan(predefinedArea.TopLeft, predefinedArea.BottomRight, captureGridSize, outputPixelScale, captureDelay) + local topLeft, bottomRight = predefinedAreaFunction() + self:StartCapturingAreaScan(topLeft, bottomRight, captureGridSize, outputPixelScale, captureDelay) else Message:ShowRuntimeError("PredefinedArea", string.format("Unknown predefined capturing area %q", tostring(area))) end