I see. Still, better to calculate the optimal value and set it to that.
I use this now:
Code:
local scaler = CreateFrame("Frame")
scaler:RegisterEvent("VARIABLES_LOADED")
scaler:RegisterEvent("UI_SCALE_CHANGED")
scaler:SetScript("OnEvent", function()
if 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)") < .64 then
UIParent:SetScale(768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))
end
end)
(Registering UI scale change because I switch in and out of windowed mode a lot)
And everything works fine! (well, my GPU diode is chilling at 85°C but that's a different story...)