Input anomalies on AYN Odin

Godot Version 4

I don’t know if this is the right place to post this, but here goes:

Hello, I’m still just starting to dip my toes into working with Godot. One of the projects I threw together to learn how things work is a simple gamepad tester thing. After I got my Odin, I decided to compile the gamepad tester for Android, which was a bit of a journey, and then loaded it up to see what would happen. The L2 and R2 indicators stayed lit up after the initial press. In addition, I pressed the A button and got the B indicator, and vice versa. The X and Y buttons were similarly swapped around. I decided to investigate the L2 and R2 sticking and found that after the initial press, the trigger buttons were bottoming out at 0.5 when the buttons were fully released.

That wall of text is for the engine devs, so that they can add whatever they need to their list of controller profiles. I would suggest doing similar tests on other android gaming handhelds like the Retroid Pocket, but in the meantime, is there a way to detect what controller is “plugged in” and return that information as a string?

Kinda. Inputevents have a device property. You would us Input Singleton to get more info. Inputmap can also lock input actions to device number as well as set analog dead zones.

Godot uses a third party database for button mapping, so if it somehow wrong it’s not Godot’s fault.

Ps I’m not a dev

Just did some poking around. If I’m understanding what I see correctly, the database just doesn’t have the Odin yet. It’s got a bunch of other retro handhelds, though.

That’s what I saw as well.

You could contribute one, but I don’t know the process.

They seem to have a tool they want you to use, but they don’t provide it pre-compiled, and I’m still a complete noob with compiling stuff for Android outside of letting Godot handle it for me. I didn’t see an entry for the Retroid line, either, but I did see some Odroid Go devices. I’ll probably do some more poking around later, but right now I want to do something else.

You can create a mapping using the Joypads demo project, which doesn’t require you to compile Godot. You just need to import and run the project in Godot 4.2.1, select the controller ID in the top-left corner of the demo then click the Remap button in the bottom-right corner.

I just got done checking out that demo, and honestly, it’s poorly designed. Whoever wrote the thing up didn’t put much thought into making the remapping process understandable. You just get “Step x of 20” with no indication of what you’re supposed to do or what you’re remapping. It’s like the author forgot that people can’t read minds. It also seems buggy, because when I start it up, the buttons light up correctly, but the moment I hit the remap button, the ABXY buttons all get scrambled.

Gonna double post here with what I’ve decided to do. I think my best option is to study SDL’s documentation as well as I can and throw together a tool of my own. I still haven’t done anything with file handling yet, and this should be a good way to try it out.

Edit: There are some further complications with the case of the Odin, because there’s an option called “Controller Style” that lets you choose between Xbox Style and Odin Style. The ABXY buttons are in the Nintendo arrangement, and all the emulators get AB and XY messed up if I have it set to Xbox Style. My little joypad test, on the other hand, gets them messed up as stated above when it’s set to Odin Style. Instead of trying to figure that mess out, I think I’m better off just including a button mapping page when I get to the stage of developing what I want to make.