SFML community forums

Help => Window => Topic started by: bpx95 on January 08, 2012, 11:11:51 pm

Title: [SOLVED] Changing Cursor Position Also Stops Movement
Post by: bpx95 on January 08, 2012, 11:11:51 pm
I noticed that when you use Window::SetCursorPosition(), it also makes it so the mouse stops moving for a second. This makes it next to impossible to create a first person camera.

Does anyone know a workaround? I saw another solution that let you move your mouse infinitely in any direction, but you aren't able to click if your cursor is outside of the window.

EDIT: Sorry for quick self-answer, but maybe it can help someone in the future. I was able to use CGSetLocalEventsSuppressionInterval(0), which keeps it from stopping like it was. However, this function is deprecated, so I'm going to look into a replacement, and if I find a good one, I'll report it back here.

I think this line of code should be added somewhere in SFML so that it can be cross-platform.
Title: [SOLVED] Changing Cursor Position Also Stops Movement
Post by: Hiura on January 09, 2012, 08:24:10 am
Quote
Does anyone know a workaround?
Yes, use SFML 2. It was fixed months ago.  :wink:

PS : CGSetLocalEventsSuppressionInterval doesn't solve the issue. It was more tricky than that. If you're interested, you can look at this changelog : https://github.com/SFML/SFML/commit/c1ce16f4d6272936e51c554c17c532926ffef8da