Skip to content

Commit

Permalink
Fix predefined area error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadido3 committed May 6, 2024
1 parent 0065afe commit 203a0ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions files/capture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 203a0ea

Please sign in to comment.