Skip to content

Commit 69b69e2

Browse files
YangLeoZhaoclaude
andauthored
Add missing GetVirtualScreenSize stub to HeadlessWrapper (#1789)
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 b58beb9 commit 69b69e2

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)