Mouse Cursor exiting screen

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
LegoStax
Prole
Posts: 4
Joined: Fri May 20, 2016 12:49 am

Mouse Cursor exiting screen

Post by LegoStax »

I am having a problem with the mouse cursor partially "exiting" the screen. What I mean is that the cursor image stays within the bounds of the screen, but it seems as though the internal cursor position exits the normal bounds of the screen. For example, if I move the mouse against the left side of the screen and continue to move it, the cursor image will stay where it should. After moving the mouse continuously to the left, I move it back to the right and the cursor image appears to stay against the left side of the screen until the internal mouse position has moved back into the bounds of the screen. This also happens with the default system cursor.
I am using the "desktop" mode for fullscreen. I have also tried "exclusive" mode to no avail.

For those that read the code: I realize that my drawing of the cursor is inefficient as LOVE supports the ability to set the system cursor. However, I found that setting the system cursor causes it to glitch and become a white box if it is moved to the bottom right corner of the screen.

I have built LOVE from source on the Raspberry Pi 3. Hence, I'm wondering if this is an issue with Raspbian Jessie Lite, SDL, or LOVE (and how to fix it of course ;) ).

If it helps, I get this error on Raspbian, but it does not stop the code from running:

Code: Select all

AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
Research tells me that it's an issue with sound, which I do not need.

Code download: https://legostax.github.io/files/loveccemupi.love
It's also attached.
Attachments
loveccemupi.love
(4.09 KiB) Downloaded 60 times
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Mouse Cursor exiting screen

Post by slime »

LÖVE does not support detecting the mouse cursor position outside of the LÖVE window (it's not a bug).
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Mouse Cursor exiting screen

Post by zorg »

But if you haven't already, you can do [wiki]love.mouse.setGrabbed[/wiki] and that will restrict the cursor to always be inside LÖVE's window.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: Mouse Cursor exiting screen

Post by Sulunia »

LegoStax wrote: I have built LOVE from source on the Raspberry Pi 3. Hence, I'm wondering if this is an issue with Raspbian Jessie Lite, SDL, or LOVE (and how to fix it of course ;) ).

If it helps, I get this error on Raspbian, but it does not stop the code from running:

Code: Select all

AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
Research tells me that it's an issue with sound, which I do not need.
Eh, don't worry. Audio probably works, at least it does in my game, even though it errors exactly like that.
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Mouse Cursor exiting screen

Post by bartbes »

Thankfully, as indicated by the W, it's a warning, not an error. OpenAL soft tries a number of different backends, one of which is PulseAudio, but another common one to show up in those warnings is JACK. If you have installed the relevant client libraries (libpulse or libjack, respectively), OpenAL soft will try to open them in some pre-determined order, which seems to be (at least) JACK → PulseAudio → ALSA → OSS. In your case, you have libpulse available, but pulseaudio isn't running, thus it can't create a pulse backend, then (probably) continues with ALSA. If you want to suppress the warning, you can disable backends in alsoftrc.
User avatar
LegoStax
Prole
Posts: 4
Joined: Fri May 20, 2016 12:49 am

Re: Mouse Cursor exiting screen

Post by LegoStax »

That's what I don't understand. I have done love.mouse.setGrabbed(true). I tested it to make sure that it works by trying it without fullscreen. Here's a video of my issue.
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: Mouse Cursor exiting screen

Post by Sulunia »

Wow, now that's a nice bug report.
If you think it may be your compiled version or something of the sorts (which i somehow doubt), you can try this:
http://pilove.mitako.eu/
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
LegoStax
Prole
Posts: 4
Joined: Fri May 20, 2016 12:49 am

Re: Mouse Cursor exiting screen

Post by LegoStax »

Sulunia wrote:Wow, now that's a nice bug report.
If you think it may be your compiled version or something of the sorts (which i somehow doubt), you can try this:
http://pilove.mitako.eu/
I actually already have tried that distro. I couldn't get PipaOS (which is what it's based off of) to work with the Raspberry Pi 3's wifi card, despite following the instructions on the pilove.mitako.eu website. Moreover, it still produces the same glitch with the mouse cursor.
I'm currently working on setting up LOVE on Raspbian Jessie (not Lite) to see if having xserver and openbox already installed and configured will help the situation (Raspbian Jessie Lite doesn't have those). I'll post the results here.
User avatar
LegoStax
Prole
Posts: 4
Joined: Fri May 20, 2016 12:49 am

Re: Mouse Cursor exiting screen

Post by LegoStax »

I report that LOVE does not work on Raspbian Jessie (not Lite) at all. There's an error with SDL when running it in the desktop environment. When running LOVE from the command line, outside of the desktop environment, then the screen is covered with Raspbian's colormap that displays on boot. Hence, the only way to get LOVE to work at all is on Raspbian Jessie Lite.
Unless someone finds a way to fix the cursor issue, it looks like we're back to square 1.
I'll file a bug report.
EDIT: A bug report has been filed.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 202 guests