High DPI Scaling seems broken

Create issue
Issue #90 invalid
Joseph Brower created an issue

I've got my game scaling properly on all desktops I've used (including some with High DPI) but on some of the High DPI mobile devices, the scaling seems to place everything in the top left of the screen. We're basing our scaling on the love.window.getWidth and love.window.getHeight but it seems to be giving us incorrect values.

Comments (3)

  1. Alex Szpakowski

    We're basing our scaling on the love.window.getWidth and love.window.getHeight but it seems to be giving us incorrect values.

    You should usually use love.graphics.getWidth and love.graphics.getHeight combined with love.window.getPixelScale. love.window.getWidth/getHeight don't use the same coordinate space across all operating systems and they're deprecated anyway (and will be removed in future LÖVE versions.)

    Also keep in mind the pixel scale factor will always vary on Android devices even if the highdpi flag isn't enabled, unlike on other operating systems.

  2. Log in to comment