[BUG] "Gamepad Thumbstick Button" broken on Linux

Unfortunately it appears the “Gamepad Thumbstick Button” events in Unreal Engine 4.16 are not working correctly on Linux:

Testing the above Blueprint with an official Xbox 360 controller (wired) works on Windows 10 (x64) but not Ubuntu 16.04.2 LTS (x64), interestingly using the “Gamepad Thumbstick Down” event does work when using either the button or direction on the gamepad (SDL bug?)

Hopefully it’s a simple issue with a swift resolution, many thanks in advance.

Hey mindmatter

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-45722) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-45722)

Hi , thanks for the confirmation.

We’ll monitor the Unreal Engine issue tracker for updates and mark this post as answered/complete once resolved.

Many thanks again.

This is caused by a wrong translation of SDL events.
To fix this change LinuxApplication.cpp:648 from

		case SDL_CONTROLLER_BUTTON_LEFTSTICK:
			Button = FGamepadKeyNames::LeftStickDown;
			break;
		case SDL_CONTROLLER_BUTTON_RIGHTSTICK:
			Button = FGamepadKeyNames::RightStickDown;

to

		case SDL_CONTROLLER_BUTTON_LEFTSTICK:
			Button = FGamepadKeyNames::LeftThumb;
			break;
		case SDL_CONTROLLER_BUTTON_RIGHTSTICK:
			Button = FGamepadKeyNames::RightThumb;

Danke, we can confirm your change finally resolves this issue (LinuxApplication.cpp).

****: Is there a specific process to have this updated on GitHub or should we just send a PR?

Many thanks in advance.

Hey mindmatter-

Entering a pull request would be the most direct way to submit a community change to the engine. Once submitted it will be reviewed for compatibility with other source code as part of the consideration for inclusion into the engine.

Hi , thanks for the confirmation.

We have created a PR for this issue, hopefully it will be accepted for the next release (4.19):

https://github.com/EpicGames/UnrealEngine/pull/4209

Many thanks again.