Issues

Issue #611 resolved

mouse.setPosition not working when called during load

Joshua Johnson
created an issue

The mouse.setPosition method will not work if initialized during load.

function love.load()
    love.mouse.setGrab(true)
    --Attempt to set the position of the mouse to 0,0
    love.mouse.setPosition(0,0)
end

function love.draw()
    --Print X,Y Coordinates of mouse
    love.graphics.print("Mouse Position(X: " .. tostring(love.mouse.getX()) .. "  Y: "
                         .. tostring(love.mouse.getY()) .. ")", 0, 0)
end

Comments (5)

  1. Joshua Johnson reporter

    Interesting, the issue is consistent and repeatable on my stock Macbook air 13inch - OS X 10.7.5 but on my windows box it does indeed work as designed.

    I'll have to boot into my "pure" linux box and see if it can also be recreated there when I get home....perhaps a Unix only problem.

  2. Log in to comment