Mobile Gamepad issues

yodabeto

Terrarian
Your Terraria Device
Xiami Redmi Note 9
Mobile Bug Priority
Normal
Mobile OS
Android 11
Hello,
I recently bought an 8bit do SN30 pro gamepad with the purpose of playing terraria and some retro games, this gamepad has basically two types of bluetooth connection I can use Dinput or Xinput. The gamepad seems to work correctly with everything except terraria. I tested different android games, emulators and even gamepad tester apps and all of them indicate the controller(all buttons, including triggers and thumbsticks) is working correctly. I know that currently there are many people facing gamepad issues with android 11 update and some "accesibility" settings as well and it might be related. This gamepad issue on terraria is a bit complex so the whole story is explained below.

Initially:
First try (tried with both Dinput and Xinput, same result), all gamepad buttons were not recognized in game except for L1 which actually was the only button detected ingame. When tried to "Edit controller Settings" terraria didn't allow me to change any control. Next, I tried using the menu option "setup controller hardware", it appeared only when turning off then turn on gamepad (small bug?), so... in this "setup controller hardware" menu option terraria said I had a Controller: "Virtual" and it only detected and was able to remap D-pad, both Thumbsticks (sometimes called L3 and R3), select,start and A,B,X,Y buttons, in the other hand both joysticks left and right horizontal and vertical axis were not recognized also the shoulders L1,L2 and triggers R1,R2 were not recognized as well. Note: Take notice that here Thumbsticks are recognized by the hardware mapping menu.

Next try:
I heard there was an android 11 issue so applied the "workaround" disabling all accessibility features I had enabled. Now, If you remember my gamepad can connect in Dinput or Xinput mode. So, I tried with both configurations and it seemed that they both worked good and exactly the same (except A and B, and X and Y being inverted in each case, not much of an issue really), now both joysticks left and right were completely functional but then I started doing deeper tests and hell I was wrong, there are still issues. I found two sets of behavior, one for Dinput and other for Xinput

Xinput: All buttons work, except L2,R2(Triggers) and L3,R3 (thumbsticks buttons)
Dinput: All buttons work, except L3, R3 (thumbsticks buttons)

In summary, it seems that this game controller issue in terraria is somewhat related to the buggy android 11 update since it improves using the workaround but...it still seems to be a terraria issue because any other game, gamepad tester, emulators correctly detected the controller even though I had the accesibility settings enabled. Terraria was the only thing requiring me to apply the android 11 "workaround".
I know you have told multiple times that not all controllers are supported but for this gamepad I think this is not the case since android 11 workaround + Dinput configuration allowed this gamepad to be almost 100% functional except for the L3 and R3 buttons
 

BubbleGum

Terrarian
Hello i've read the post and I have 8BitDo Pro2 and like you my Dinput does not register my L3,R3 (thumbstick buttons)
 

Lac2224

Terrarian
Yes. It is only with Terreria. Other applications work good, could be related to the android 11 gamepad issues. Let's see if it is possible to be fixed.
it must be android 11 and terraria, on another device with Android 10 it works fine, except for LT and RT, in my case
 

Lightstrike

Terrarian
This is extremely annoying. It has nothing to do with android 11, and everything to do with how they've decided to handle controllers in the app. If you look at any emulator for example, basically every single controller that exists is supported because you're always able to map any input recognized by the OS to the emulator function. However in Terraria, for some stupid reason they decided to completely hide and disable the "setup controller hardware" menu for any controller the app "thinks" it supports. I'm pretty sure in our case, the app "thinks" it supports the 8bitdo sn30 pro, but when it comes to L3 and R3 inputs, it's expecting a different input than what it's getting, and just ignores the other input. And because we can't map our real L3 and R3 input values to the game's L3 and R3, we can't do anything about it.
If you're still confused about what I mean, hopefully this last explanation will help: When in Dinput mode on these controllers, the triggers (L2 and R2) work fine because the app is looking for certain trigger key values, and the controller serves these expected values for the trigger presses. However in Xinput mode, the app is looking for xbox controller values. Xbox controllers use analog triggers (full range of motion), while this controller has digital triggers (on/off only). And this is why the triggers don't work in Xinput mode for the terraria app.

I could be wrong, but this is the explanation I've stuck with. I even asked about this issue back in 2020 on the official discord, right after controller support was initially added. However, the only responses I got from the devs was that they could possibly look into adding support for 8bitdo controllers (which they obviously never did add support for). However this type of support is not the best solution. This is the reason why so few controllers are supported, because their controller support method is built in a way which requires them to manually add mappings for every controller which they want to support. I just don't understand why in addition to this, they don't provide the controller mapping menu at all times! If they just let the end user map their controller to a virtual xbox controller for example, they wouldn't need to manually support every controller - the user would map the controller themselves! Like I said in the beginning, every emulator app uses this method and thus is able to support every single controller that is able to connect to your phone and is supported by the linux/android kernel.
I'm not saying that the current method is completely garbage. It has some advantages, like having automatic controller configurations 'outta the box' ready to go. There just needs to be a way for user to manually edit the mappings - and it needs to be available 100% of the time. Not only when the app deems it necessary to appear.
 
Top Bottom