PDA

View Full Version : Problems with cursor position



chronozphere
18-03-2007, 01:53 AM
Okay... i'am very tired but before i go to bed, i'll post this. :fuzzy:

I have a few problems with my cursor's position.
I use DirectInput to retrieve the position changes since it doesn't return the positon in absolute screen coordinates.
When i initialize my game i set the cursor to (0,0). (that's just for testing, will change in the future) :).

When i start moving my cursor slowly to the right of the screen, everything's fine and coordinates are looking normal.
But when i move back to the top-left of the screen the coordinates are just not right. apparently There is a small deviation.

When i move my cursor very fast, i can get it to the right side of the screen with an X coord lower than 750 while my resolution is 1024x768. :?

Can anyone explain this?? should i use DXInput to calculate the screen coordinates of the mouse or should i call GetCursorPos very game-loop?? I think it's neater to do it with DX, but it doesn't work good, right now.

Can someone give me a hint on this??? :P

Thnx very much.

Traveler
18-03-2007, 12:41 PM
Sorry, no clue on a solution. :(

But I did want to mention that I find the quote below your message too funny with this particulair problem. :lol:

chronozphere
18-03-2007, 03:40 PM
oohh my GODD... the bugz have sabotaged my cursor :twisted:
Now i cant kill them anymore.... :eh: :x

I just wonder whether this is the right way to update your cursor position. Should i do it like this.??

edit:

lol... 'coders rule nr2: if your cursor doesn't work... try a JOYSTICK :D '