Mouse Speed and DirectInput

Has anyone implemented the code required to observe the control panel
settings for the mouse when using fullscreen DirectX on Win32 platforms?
Since SDL uses DirectInput in this case, we get raw unscaled pulses from the
mouse. It is really noticeable on my stuff when you go to 1280x1024 mode and
it takes two or three full swipes of the mouse to move the cursor from one
side of the screen to the other. (The system settings for mouse button
swapping are also ignored, but this is a different issue.)

I know how to implement this but I don’t want to go around reinventing
wheels. The biggest problem that I have is that the implementation ends up
being both platform and mode specific. Is this something that should be
built into SDL in some fashion? Possibly a way to optionally disable mouse
DirectInput with an initialization flag or something? Maybe a method to
switch between raw and system scaled mouse data? This is not an issue with
fullscreen GDI on Win32 since DirectInput is not being used although now you
run into the inverse problem.

The inverse problem is applications like Quake that really need raw mouse
pulses but get scaled values when running in windowed mode. I think the
general rule is that if your application needs a mouse cursor (system or
user drawn), it should be observing system settings for mouse speed and
acceleration. If it uses the mouse as an input device similar to a joystick
(in fullscreen or windowed mode), then it should be getting raw pulses. I’m
not sure what an SDL solution for this would look like or how these two
issues play out on different platforms. I can imagine that some apps might
need both modes, scaled for setup screens and raw for game mode.

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

Has anyone implemented the code required to observe the control panel
settings for the mouse when using fullscreen DirectX on Win32 platforms?
Since SDL uses DirectInput in this case, we get raw unscaled pulses from the
mouse. It is really noticeable on my stuff when you go to 1280x1024 mode and
it takes two or three full swipes of the mouse to move the cursor from one
side of the screen to the other. (The system settings for mouse button
swapping are also ignored, but this is a different issue.)

I know how to implement this but I don’t want to go around reinventing
wheels. The biggest problem that I have is that the implementation ends up
being both platform and mode specific. Is this something that should be
built into SDL in some fashion? Possibly a way to optionally disable mouse
DirectInput with an initialization flag or something? Maybe a method to
switch between raw and system scaled mouse data? This is not an issue with
fullscreen GDI on Win32 since DirectInput is not being used although now you
run into the inverse problem.

The inverse problem is applications like Quake that really need raw mouse
pulses but get scaled values when running in windowed mode. I think the
general rule is that if your application needs a mouse cursor (system or
user drawn), it should be observing system settings for mouse speed and
acceleration. If it uses the mouse as an input device similar to a joystick
(in fullscreen or windowed mode), then it should be getting raw pulses. I’m
not sure what an SDL solution for this would look like or how these two
issues play out on different platforms. I can imagine that some apps might
need both modes, scaled for setup screens and raw for game mode.

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html