fix scaleByDPI(1) returns 0 in screen of lower DPI

pull/786/head
chrox 10 years ago
parent 9398428f4e
commit 828d698b56

@ -167,7 +167,8 @@ function Screen:setDPI(dpi)
end
function Screen:scaleByDPI(px)
return math.floor(px * self:getDPI()/167)
-- scaled positive px should also be positive
return math.ceil(px * self:getDPI()/167)
end
function Screen:rescaleByDPI(px)

Loading…
Cancel
Save