So I made a game for Windows and I wanted to make an OS X version too, but I'm getting weird things going on with the mouse input when I test on Mac.
Each frame I set the mouse position to the middle of the screen and then next frame I check the mouse offset and use it as the input for moving the crosshair. This works fine on Windows but on Mac there seems to be some problem with setting the mouse position, mouse movements are getting amplified and the crosshair gets 'stuck' at the top of the screen.
Here's a download if you want to test, and if you want to dive into the code the mouse stuff is under player.lua.
Has anyone run into similar issues with love.mouse.setPosition() on OS X? I should also note that I've only tested a packaged .app rather than a .love.
Mouse problems on Mac
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
- slime
- Solid Snayke
- Posts: 3132
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Mouse problems on Mac
That seems to be caused by a Mac-specific bug in the version of SDL (the library LÖVE uses for cross-platform windowing/input) that LÖVE 0.9.1 ships with. The bug has been fixed since then and the next version of LÖVE (0.9.2) will use the fixed version.
In the meantime I might upload a new build of LÖVE 0.9.1 for Mac containing the updated version of SDL, though.
In the meantime I might upload a new build of LÖVE 0.9.1 for Mac containing the updated version of SDL, though.
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
Re: Mouse problems on Mac
Thank you, that would be really appreciated.slime wrote:In the meantime I might upload a new build of LÖVE 0.9.1 for Mac containing the updated version of SDL, though.
- slime
- Solid Snayke
- Posts: 3132
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Mouse problems on Mac
Done! If you redownload the Mac version of LÖVE from the love2d.org homepage it should have a newer build of SDL2 inside the .app.
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
Re: Mouse problems on Mac
Fantastic, I'll add a Mac download tonight. Thank you!slime wrote:Done! If you redownload the Mac version of LÖVE from the love2d.org homepage it should have a newer build of SDL2 inside the .app.
Who is online
Users browsing this forum: No registered users and 40 guests