Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Changing Cursor Position Also Stops Movement  (Read 1283 times)

0 Members and 1 Guest are viewing this topic.

bpx95

  • Newbie
  • *
  • Posts: 1
    • View Profile
[SOLVED] Changing Cursor Position Also Stops Movement
« 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.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
[SOLVED] Changing Cursor Position Also Stops Movement
« Reply #1 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
SFML / OS X developer

 

anything