Skip to content

Commit e1360fe

Browse files
github-actions[bot]NightbladeLocalIdentity
authored
[pob1-port] Slighty better nil checks for missing API function (#1577)
* Apply changes from PathOfBuildingCommunity/PathOfBuilding#9128 * Fix conflicts --------- Co-authored-by: Nightblade <Nightblade@users.noreply.github.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 2a8b40a commit e1360fe

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/HeadlessWrapper.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ end
5151
function GetScreenScale()
5252
return 1
5353
end
54+
function GetDPIScaleOverridePercent()
55+
return 1
56+
end
57+
function SetDPIScaleOverridePercent(scale) end
5458
function SetClearColor(r, g, b, a) end
5559
function SetDrawLayer(layer, subLayer) end
5660
function SetViewport(x, y, width, height) end

src/Modules/Main.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ function main:Init()
113113
self.showFlavourText = true
114114
self.showAnimations = true
115115
self.errorReadingSettings = false
116+
117+
if not SetDPIScaleOverridePercent then SetDPIScaleOverridePercent = function(scale) end end
116118

117119
if launch.devMode and IsKeyDown("CTRL") or os.getenv("REGENERATE_MOD_CACHE") == "1" then
118120
-- If modLib.parseMod doesn't find a cache entry it generates it.

0 commit comments

Comments
 (0)