moonlight-android icon indicating copy to clipboard operation
moonlight-android copied to clipboard

feat: add game back menu

Open kmreisi opened this issue 2 years ago • 15 comments

Adds a very simple menu on "back" action while streaming.

The menu prevents from accidentally disconnecting and allows to send key events which are handy for game streaming and can not be send through the android keyboard, e.g. Exit full screen with F11 / ESC.

Screenshot_20230115-144803

Screenshot_20230115-144815

kmreisi avatar Jan 15 '23 13:01 kmreisi

Nice PR. Hope this PR will be merged to master soon. The other idea is that you may consider to add Ctrl + V button to support pasting from clipboard too. It's very useful for chatting in games.

dangnm avatar Jan 21 '23 01:01 dangnm

I added a Toggle Keyboard option to the generic game menu.

Screenshot_20230215-085739

and the Mouse emulation selection to the game menu when launched from a controller Screenshot_20230215-085748

Now the game menu can show controller specific options.

Alternatively we could always show the mouse emulation toggle and apply the change to all controllers.

kmreisi avatar Feb 15 '23 08:02 kmreisi

@cgutman please have a look :-)

kmreisi avatar Feb 26 '23 19:02 kmreisi

Sorry for the delays reviewing this. I will try to take a look by this weekend.

cgutman avatar Mar 14 '23 03:03 cgutman

@cgutman this is working for me since a while now :-)

Could you give it a try? I tested it using my Odin, Android TV emulator, Pixel 7...

Thanks :-)

kmreisi avatar Jul 08 '23 07:07 kmreisi

@cgutman this is working for me since a while now :-)

Could you give it a try? I tested it using my Odin, Android TV emulator, Pixel 7...

Thanks :-)

I've also been using these changes along with mine in #1219 for about a month now without any issues.

tlusk avatar Jul 10 '23 12:07 tlusk

@cgutman any updates on this PR? :D

dangnm avatar Sep 17 '23 02:09 dangnm

I don't think I want to merge it for v12.0, but I haven't forgotten about it.

With the latest Sunshine protocol extensions, we can now send native multitouch input to the host. The trouble is that sending every touch natively to the host means that our 3 finger tap gesture no longer works to open the keyboard (or the gesture conflicts with legitimate input). This PR solves that issue quite nicely, so I plan to merge it for v12.1/v13.0 when we enable native touch passthrough.

cgutman avatar Sep 17 '23 04:09 cgutman

Is that possible to add a command to send the guide menu action from there? I think geforce NOW has something similar it would help for gamepads who don't have it, and also solves the problem with the guide menu combos

mattvgm avatar Oct 21 '23 18:10 mattvgm

Is that possible to add a command to send the guide menu action from there? I think geforce NOW has something similar it would help for gamepads who don't have it, and also solves the problem with the guide menu combos

Would be extremely useful for Nvidia Shield TV since it overwrites Guide button on gamepads to always show Android TV home screen at the system level.

Danik1601 avatar Jan 25 '24 15:01 Danik1601

Is that possible to add a command to send the guide menu action from there? I think geforce NOW has something similar it would help for gamepads who don't have it, and also solves the problem with the guide menu combos

Would be extremely useful for Nvidia Shield TV since it overwrites Guide button on gamepads to always show Android TV home screen at the system level.

When I posted this, I have made a draft code to do this and worked great. If @kmreisi agrees I can help him. Or maybe we can wait till this one gets merged and open another PR. I used for running on my device and worked pretty great

mattvgm avatar Jan 26 '24 21:01 mattvgm

Is that possible to add a command to send the guide menu action from there? I think geforce NOW has something similar it would help for gamepads who don't have it, and also solves the problem with the guide menu combos

Would be extremely useful for Nvidia Shield TV since it overwrites Guide button on gamepads to always show Android TV home screen at the system level.

When I posted this, I have made a draft code to do this and worked great. If @kmreisi agrees I can help him. Or maybe we can wait till this one gets merged and open another PR. I used for running on my device and worked pretty great

@mattvgm feel free to put a commit on top / share your draft so I can cherry-pick your change... I'm using this PR since a long while since it allows me to close Yuzu ;-). Having the Guide button would be practical as well. :-)

@cgutman anything I can do to improve this PR to simplify the merge ? ;-)

kmreisi avatar Jan 29 '24 09:01 kmreisi

Hello, it's possible to have apk with last with updated code v12.1 ? Thanks :)

moi952 avatar Apr 17 '24 19:04 moi952

@cgutman Do you think this PR could be included in the next release?

This one https://github.com/moonlight-stream/moonlight-android/pull/1219 is related, it would be great to be able to pass both if possible :) Thanks

moi952 avatar Apr 19 '24 15:04 moi952

On the topic of the guide button, sunshine now supports registering a long press of the back button to trigger guide. Which I've found very useful.

StanLindsey avatar May 01 '24 21:05 StanLindsey