While working on Raze, I've noticed the SDL interface under Linux can sometimes appear to miss mouse clicks. I looked into this and SDL is properly sending through the events, but sometimes the click down and click up can both be read before the game has processed the click down, meaning nothing happens.
I've submitted PR #1509 to note down that if any keys go down during the processing of events and if there is a key up event for the same key in the same cycle, delay it until the next cycle. This effectively ensures all mouse clicks and key events get processed no matter what.
I've tested this and it works great but I'm only one Linux user, we'd love some further testing and I've presented it to GZDoom as it's got the larger audience. Other benefits this could have for all platforms are that it would make fast spinning of the mouse wheel a lot more reliable to ensuring all the event gets properly processed.
Thanks,
Mitch.
Request for testing on PR for Linux users and mouse buttons
Moderator: GZDoom Developers
-
- Posts: 829
- Joined: Sun Jun 16, 2019 9:17 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Gosford NSW, Australia
-
- Posts: 829
- Joined: Sun Jun 16, 2019 9:17 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Gosford NSW, Australia
Re: Request for testing on PR for Linux users and mouse butt
A quick video demonstrating the issue before the PR is applied, and with the PR applied about half-way through. I'm clicking in a way to highlight the issue but I do get missed clicks on normal gameplay.
Excuse the messy desk!
Excuse the messy desk!
Last edited by mjr4077au on Wed Nov 17, 2021 7:13 pm, edited 1 time in total.
-
- Admin
- Posts: 6190
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Request for testing on PR for Linux users and mouse butt
I know we discussed in the discord, but I can confirm the PR fixes the issue I didn't know I had until seeing this thread.
-
- Posts: 13736
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Request for testing on PR for Linux users and mouse butt
For those on Linux, timescaling down using i_timescale 0.1 might indeed help with testing this PR.
-
- Posts: 13736
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Request for testing on PR for Linux users and mouse butt
I think mjr's PR is safe to merge. There is another that should be tested/evaluated though - https://github.com/coelckers/gzdoom/pull/1510 - also affects Linux.
This was a change that was requested - apparently on some distros, SDL defaults to minimizing when you alt-tab away. That is, needless to say, not very desirable unless in fullscreen and you want to actually see the desktop. Apparently this behavior is also inconsistent across distros - some distros have SDL default to minimizing on focus loss, some distros have SDL default to not minimizing.
This was a change that was requested - apparently on some distros, SDL defaults to minimizing when you alt-tab away. That is, needless to say, not very desirable unless in fullscreen and you want to actually see the desktop. Apparently this behavior is also inconsistent across distros - some distros have SDL default to minimizing on focus loss, some distros have SDL default to not minimizing.
-
- Posts: 13736
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Request for testing on PR for Linux users and mouse butt
After trying the PR myself, yes it does seem to work, and the mouse button input does seem to be much better.
-
- Posts: 829
- Joined: Sun Jun 16, 2019 9:17 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Gosford NSW, Australia
Re: Request for testing on PR for Linux users and mouse butt
Thanks, I appreciate all the testing so far and I'm glad its made genuine, noticeable improvements and its not just me
-
- Lead GZDoom+Raze Developer
- Posts: 49143
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Request for testing on PR for Linux users and mouse butt
Then let's merge it.