Slow mouse response update

Running under Windows 2000, if I slow the frame rate between each
sdl_flip(display) call (using sdl_delay), and display both the hardware
mouse cursor (or sdl generated cursor if you like) and an image drawn at the
mouse coordinates (got using
SDL_GetMouseState) the image lags behind the sdl cursor by a considerable
margin.

This leads to a bizarre visual arrangement when you move the cursor then
stop where you see the image chase down the mouse cursor.

If I don’t display the hardware cursor, then the user gets the feeling that
the mouse movement is extremely sluggish, and lags several steps behind
their own hand movement with the mouse.

Can anyone help in any way?

Rob

Running under Windows 2000, if I slow the frame rate between each
sdl_flip(display) call (using sdl_delay), and display both the hardware
mouse cursor (or sdl generated cursor if you like) and an image drawn at the
mouse coordinates (got using
SDL_GetMouseState) the image lags behind the sdl cursor by a considerable
margin.

This leads to a bizarre visual arrangement when you move the cursor then
stop where you see the image chase down the mouse cursor.

It sounds like you’re not processing all events every frame. Take a look
at my previous message. The “while” part of that is key.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi Sam, thanks for the response.

I do have a while(SDL_PollEvent(&event)) loop, though.

I’ve even tried calling GetCursorPos, mind you, which I take is the direct x
method that SDL calls under windows. It has exactly the same response. I
suspect this simply means I’m being a complete fool somewhere.
shrug
Oh well, thanks for taking the time to respond to me. I’ll look into it and
report to anyone that’s interested if I get it working.

Interestingly, on my wife’s computer, there is no such problem (and she’s
running win2k also) with the delayed response.

I’m using a Microsoft Intellimouse, if that’s of any help … which I
doubt.> ----- Original Message -----

From: slouken@devolution.com (Sam Lantinga)
To:
Sent: Sunday, March 09, 2003 4:50 PM
Subject: Re: [SDL] Slow mouse response update

Running under Windows 2000, if I slow the frame rate between each
sdl_flip(display) call (using sdl_delay), and display both the hardware
mouse cursor (or sdl generated cursor if you like) and an image drawn at
the

mouse coordinates (got using
SDL_GetMouseState) the image lags behind the sdl cursor by a
considerable

margin.

This leads to a bizarre visual arrangement when you move the cursor then
stop where you see the image chase down the mouse cursor.

It sounds like you’re not processing all events every frame. Take a look
at my previous message. The “while” part of that is key.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Okay, the mouse lagging only ever occurs when I am running in a window. It
doesn’t happen using full screen mode with software surfaces.

I’m pretty stumped :(.

I have the same problem with my M$ Intellimouse explorer.
The mouse is always ‘laggy’ on the machine i use it on.
machine specs :
AMD 1.4Ghz Atlon Thunderbird
1,5 Gig SD-Ram
ECS mobo
WinXP Pro

The problem exists both with PS/2 as USB.
I don’t have the problem when i use a different mouse.

Hope this helpes in any way.