Skip to content

Commit 81a3ee5

Browse files
YangLeoZhaoclaude
andcommitted
Add missing GetVirtualScreenSize stub to HeadlessWrapper
Launch.lua calls GetVirtualScreenSize() in DrawPopup() and during restart, but HeadlessWrapper.lua only stubs GetScreenSize() and GetScreenScale(). When running headless and an error triggers DrawPopup on the first OnFrame, this causes a crash because GetVirtualScreenSize is not yet defined (Modules/Common.lua where it is normally defined hasn't loaded yet). The stub delegates to GetScreenSize() since GetScreenScale() returns 1 (no scaling) in headless mode, matching what the real implementation in Common.lua would produce. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3ff8900 commit 81a3ee5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/HeadlessWrapper.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ end
5151
function GetScreenScale()
5252
return 1
5353
end
54+
function GetVirtualScreenSize()
55+
return GetScreenSize()
56+
end
5457
function GetDPIScaleOverridePercent()
5558
return 1
5659
end

0 commit comments

Comments
 (0)