love2d / love-android

Android build setup for LÖVE.
https://love2d.org
Other
201 stars 70 forks source link

Incorrect window dimensions. #218

Closed galaGOlol closed 2 years ago

galaGOlol commented 2 years ago

The window dimensions are incorrectly reported in the play store version of the love app. Here is the code needed to reproduce the issue. I only have one android, so cannot verify that the behavior is replicatable.

local x = 0
local y = 0
local xcoe = 5
local ycoe = 5

function love.draw()
        love.graphics.circle("fill",x,y,10,10)
        x = x+xcoe
        y = y+ycoe
        w, h, flags = love.window.getMode()

        if x > w or x < 0 then
                xcoe = xcoe*(0-1)
        end
        if y > h or y < 0 then
                ycoe = ycoe*(0-1)
        end
end

Android version is: 7.1.1 Release is the latest on play store.

galaGOlol commented 2 years ago

What I expected, the ball should bounce when it gets to the edge, as it does on desktop. What I got: the ball goes significantly past the edge of the screen before bouncing back.

MikuAuahDark commented 2 years ago

The Play Store version (and the APK in the releases) is bit outdated. The latest main branch already have this problem fixed and it's expected to arrive in the next LOVE release.