devilutionX
devilutionX copied to clipboard
[android] Right mouse button acting as back button
This appears to be a kernel "feature" on some Android devices. Meaning that the player won't be able use the right mouse button on affected devices.
https://github.com/libsdl-org/SDL/issues/2067 has a comment with a possible workaround:
The solution is to add:
@OverRide public void onBackPressed() { /* generate a fake right mouse button event here ?*/ }
to SDLActivity.java.
One down side here is that we would also like to enable the back button in menus, but since we don't need right click there, maybe it is possible to apply this workaround without having to make it a config or lose the back button functionality.
It looks like SDL already handles this to some extent: https://github.com/diasurgical/devilutionX/blob/8138121e39d4d2fbf8afefc338a4c05ac401b98e/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java#L2032 but doesn't translate it to a mouse event. I think there is an example of how to do so here: https://github.com/diasurgical/devilutionX/blob/8138121e39d4d2fbf8afefc338a4c05ac401b98e/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java#L565
Any update on this? Playing on android tablet I would be really glad to use rightclick on my mouse.
None of the developers have access to a device with this issue, so we have been unable to work on it. Maybe if you join the chat you can help with testing possible workarounds for devices that have this issue.
Withing the game Its doing nothing in lobby or game. Outside in android for example browsers its working as back button. Also tagged you on discord so se can work on that there.