Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse speed + double click annoyance in Linux #389

Open
Gerwin2k opened this issue Nov 28, 2021 · 1 comment
Open

Mouse speed + double click annoyance in Linux #389

Gerwin2k opened this issue Nov 28, 2021 · 1 comment

Comments

@Gerwin2k
Copy link

I can compare two builds of Shockolate: WIN32 and Linux 64.
Somehow no problems with WIN32 in this regard, but the Linux 64 version has an annoyance with the mouse control, two things:

1 - Mouse double click is not working comfortably, often the double click is not registered as such. I fixed it by increasing the time window in which the second click can be registered to make for a double click:
src\GameSrc\input.c line 1147:

-   uiDoubleClickTime = 45;
+   uiDoubleClickTime = 90; 

2 - Mouse cursor speed (sensitivity?) is more then halved when in the 3D game, compared to the main menu or options menu. I found a way to maintain full cursor speed with the modification below. Setting RelativeMouseMode to False before the check for it. But since I do not know exactly what it implies, I do not dare to call it a proper fix:
src\Libraries\INPUT\Source\sdl_events.c line 692:

       case SDL_MOUSEMOTION: {
+           SDL_SetRelativeMouseMode(SDL_FALSE); // added line
@icosahedral-dragon
Copy link
Contributor

@Gerwin2k re your point 2: I see it as somewhat less than halved when running fullscreen. It seems to have to do with the way SDL does mouse coordinate scaling when using a logical renderer window. The absolute coordinates and relative motion values are scaled independently, and rounding errors mean that the relative motion is not necessarily equal to the change in absolute coordinates. A workaround would be to lose the 'if' clause altogether and always to use the supplied x and y coordinates directly, although that might break mouselook if the "real" mouse pointer goes outside the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants