SethRobinson / RTDink

Dink Smallwood HD is an old school zelda-like adventure/RPG that has been ported to many platforms. C++/OpenGL
Other
59 stars 7 forks source link

Cannot Attack or Talk/Examine with Android Joystick Controller #1

Closed RedRecondite closed 7 months ago

RedRecondite commented 5 years ago

rabidwolf9 got a new controller for his phone (Flydigi Wee 2) in order to play games on the go psvita/switch style.

As it stands DinkHD isn't playable with this controller by default due to not being able to attack or talk/examine without stretching for touch controls.

The attack button binding is located at:

https://github.com/SethRobinson/RTDink/blob/dae2110c928ed1ea7f8cd3c55306b9c5e2c15fa1/source/App.cpp#L789

I couldn't find anywhere that the Proton Android platform code sets VIRTUAL_DPAD_BUTTON_DOWN, which means there is no way to attack with Android if I'm reading the code correctly.

The talk button binding is located at:

https://github.com/SethRobinson/RTDink/blob/dae2110c928ed1ea7f8cd3c55306b9c5e2c15fa1/source/App.cpp#L790

Proton sets VIRTUAL_DPAD_BUTTON_DOWN here:

https://github.com/SethRobinson/proton/blob/37eabc0cb500755c90fb229bf09d29744982d54c/shared/android/AndroidUtils.cpp#L1108

'case 4' is the Android keycode, so that is supposed to be translated into talking. But 4 is actually KEYCODE_BACK in Android-speak. Despite what the comment says, this doesn't seem to work.

http://www.dinknetwork.com/forum.cgi?MID=202835

SethRobinson commented 1 year ago

Oops, just noticed this. I re-did controller support for Android in 2022 I believe, so this probably doesn't apply anymore. I'm hoping anyway. :)