Request for testing on PR for Linux users and mouse buttons

Here, developers communicate stuff that does not go onto the main News section or the front page of the site.
[Dev Blog] [Development Builds] [Git Change Log] [GZDoom Github Repo]

Moderator: GZDoom Developers

Post Reply
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Request for testing on PR for Linux users and mouse buttons

Post by mjr4077au »

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.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by mjr4077au »

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!

Last edited by mjr4077au on Wed Nov 17, 2021 7:13 pm, edited 1 time in total.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by Caligari87 »

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.

8-)
User avatar
Rachael
Posts: 13560
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

For those on Linux, timescaling down using i_timescale 0.1 might indeed help with testing this PR.
User avatar
Rachael
Posts: 13560
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

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.
User avatar
Rachael
Posts: 13560
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

After trying the PR myself, yes it does seem to work, and the mouse button input does seem to be much better.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Request for testing on PR for Linux users and mouse butt

Post by mjr4077au »

Thanks, I appreciate all the testing so far and I'm glad its made genuine, noticeable improvements and its not just me :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Request for testing on PR for Linux users and mouse butt

Post by Graf Zahl »

Then let's merge it.
Post Reply

Return to “Developer Blog”