From 203a0ea159cb4524878e3be193509127dc73fd11 Mon Sep 17 00:00:00 2001 From: David Vogel Date: Tue, 7 May 2024 01:12:11 +0200 Subject: [PATCH] Fix predefined area error --- files/capture.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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