sm64-port-android-base icon indicating copy to clipboard operation
sm64-port-android-base copied to clipboard

Autohiding overlay when controller is connected

Open guillaumevidal opened this issue 4 years ago • 8 comments

Would it be possible to autohide the touch control overlay when a controller is connected, similarly to most Android games and emulators ? I would have tried my hand at it but it seems that the overlay is not built into the Android wrapper, but in the native build itself....

guillaumevidal avatar Sep 04 '20 09:09 guillaumevidal

A dirty change/hide can be done by editing this file: https://github.com/VDavid003/sm64-port-android/blob/master/src/pc/controller/controller_touchscreen_layouts.inc

Better wait for an automatic hide when a controller is detected.

zerofalcon avatar Sep 06 '20 02:09 zerofalcon

Hi, i added a simple way to determine current input module used. Do any controller input to disable(/hide) touchscreen controls and press touchscreen to show it up again.

Could you test it? https://github.com/JustMeDaFaq/sm64-port-android

@guillaumevidal

JustMeDaFaq avatar Sep 22 '20 17:09 JustMeDaFaq

Working perfectly using a Nintendo Switch Pro Controller + Huawei P10 Plus. I'm not a fan of touchscreen controls but it's nice to have both options available when needed without interfering each other. Thanks!

zerofalcon avatar Sep 24 '20 22:09 zerofalcon

This patch works perfectly with my Xbox Controller and it greatly improves things.

rbeesley avatar Sep 25 '20 03:09 rbeesley

@zerofalcon @rbeesley Thanks alot for testing, might give it a try to commit a PR then :) Edit: Submitted a PR :)

JustMeDaFaq avatar Sep 25 '20 16:09 JustMeDaFaq

@JustMeDaFaq , sorry for the late response, I'm not able to build your commit, I screwed something up pulling it I guess. I don't see your PR, but hope it goes through soon :)

guillaumevidal avatar Sep 26 '20 16:09 guillaumevidal

A dirty change/hide can be done by editing this file: https://github.com/VDavid003/sm64-port-android/blob/master/src/pc/controller/controller_touchscreen_layouts.inc

Better wait for an automatic hide when a controller is detected.

This. Thanks!

After cloning the git repo, open the controller_touchscreen_layout.inc and set all the button values to 1500 to move them out of the screen. Then run the rest of the scripts to build the apk. (You now need a controller to play the game).

j0h3ts avatar Sep 08 '21 18:09 j0h3ts

Hi, i added a simple way to determine current input module used. Do any controller input to disable(/hide) touchscreen controls and press touchscreen to show it up again.

Could you test it? https://github.com/JustMeDaFaq/sm64-port-android

@guillaumevidal

Doesn't seem to work anymore. Tried with 8bitdo, 360 and ps4 controller. Had to tweak the controller config to move the touch screen buttons out of the screen.

j0h3ts avatar Sep 08 '21 18:09 j0h3ts