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

Request for testing on PR for Linux users and mouse buttons

Postby mjr4077au » Wed Nov 17, 2021 1:52 am

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
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby mjr4077au » Wed Nov 17, 2021 4:41 pm

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
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Caligari87 » Wed Nov 17, 2021 6:52 pm

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
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

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

Postby Rachael » Thu Nov 18, 2021 6:26 am

For those on Linux, timescaling down using i_timescale 0.1 might indeed help with testing this PR.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Rachael » Thu Nov 18, 2021 8:27 pm

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
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Rachael » Sat Nov 20, 2021 4:06 pm

After trying the PR myself, yes it does seem to work, and the mouse button input does seem to be much better.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby mjr4077au » Sun Nov 21, 2021 1:13 am

Thanks, I appreciate all the testing so far and I'm glad its made genuine, noticeable improvements and its not just me :)
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Graf Zahl » Sun Nov 21, 2021 3:03 am

Then let's merge it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Developer Blog

Who is online

Users browsing this forum: No registered users and 0 guests