I am currently trying to write an addon which switching my Edit Mode profile depending on the screen size (as my Steam Deck has more than one depending on if I use the built in or external screen).
However whenever I use the following code (even with 100% UI and render scale):
local width = math.floor(GetScreenWidth())
local height = math.floor(GetScreenHeight())
local uiScale = 100
if GetCVar("useUiScale") == "1" then
uiScale = math.floor(UIParent:GetEffectiveScale() * 100)
end
print (width .. "x" .. height .. " " .. uiScale .. "%")
2560x1440 native returns ā2133x1200 100%ā.
My plan is to have it match resolution by name either strictly ā2560x1440ā or losely ā1440pā and the actual profile selection already works, but it is kinda counter intuitive to need to create a profile ā1200pā for use on a 1440p display.
Can anyone assist?