Dosbox-staging: Make raw mouse input optional

Created on 27 Mar 2020  路  3Comments  路  Source: dosbox-staging/dosbox-staging

This is SDL related. SDL 1.2.13 (which is the version used in the official DosBox 0.74-3 build) polls mouse through OS messaging. At some point after that, SDL switched to raw input.
Technically speaking, this is the more "correct" way since this makes it so the mouse is not affected by OS mouse settings. However, this results in the mouse having a different feel which may upset some users who are used to the old mouse behavior.
There should be a way to switch raw input on and off in SDL so I suggest it's found and put into config file as an option. For reference, quite a few video games do that, they default to OS mouse messaging and have raw input as an option.

SDL2 enhancement

Most helpful comment

Hey, thanks for bringing this up :) Long time ago I was struggling to configure raw input working correctly in SDL 1.2 (it was configurable via environment variables IIRC), and after failing I totally forgot about it.

SDL 2.0.2 provides hint for setting it, we should definitely make it a user-selectable option: https://wiki.libsdl.org/SDL_HINT_MOUSE_RELATIVE_MODE_WARP

It will probably not mesh well with change under discussion in #232 - but that backport does not work at all ATM, so this seems to be much easier picking.

All 3 comments

Hey, thanks for bringing this up :) Long time ago I was struggling to configure raw input working correctly in SDL 1.2 (it was configurable via environment variables IIRC), and after failing I totally forgot about it.

SDL 2.0.2 provides hint for setting it, we should definitely make it a user-selectable option: https://wiki.libsdl.org/SDL_HINT_MOUSE_RELATIVE_MODE_WARP

It will probably not mesh well with change under discussion in #232 - but that backport does not work at all ATM, so this seems to be much easier picking.

Oh, thanks for the hint, that's exactly what we need: https://github.com/dreamer/dosbox-staging/pull/246

Initial implementation was suggested in #246 but code review requests were not fully implemented. We're putting this back into the backlog for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BPaden picture BPaden  路  4Comments

nemo93 picture nemo93  路  6Comments

morellam-dev picture morellam-dev  路  4Comments

dreamer picture dreamer  路  5Comments

kcgen picture kcgen  路  6Comments