Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add game back menu #1171

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

kmreisi
Copy link
Contributor

@kmreisi kmreisi commented Jan 15, 2023

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

@dangnm
Copy link

dangnm commented Jan 21, 2023

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.

@kmreisi kmreisi force-pushed the back_menu branch 2 times, most recently from 29f1613 to dcbc4ac Compare January 22, 2023 13:25
Copy link
Member

@cgutman cgutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very nice.

Can you consolidate the gamepad mouse mode functionality and #1170 into this menu too? You can change a long press of Start from toggle mouse mode into activating this menu instead.

app/src/main/java/com/limelight/Game.java Outdated Show resolved Hide resolved
@kmreisi kmreisi force-pushed the back_menu branch 3 times, most recently from 7c71b57 to e195957 Compare February 15, 2023 07:28
@kmreisi
Copy link
Contributor Author

kmreisi commented Feb 15, 2023

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
Copy link
Contributor Author

kmreisi commented Feb 26, 2023

@cgutman please have a look :-)

@cgutman
Copy link
Member

cgutman commented Mar 14, 2023

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

Copy link
Member

@cgutman cgutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. I'll give it a test tomorrow and merge if it looks good.

app/src/main/java/com/limelight/Game.java Outdated Show resolved Hide resolved
app/src/main/java/com/limelight/GameMenu.java Show resolved Hide resolved
app/src/main/java/com/limelight/Game.java Show resolved Hide resolved
Karim Mreisi and others added 7 commits July 8, 2023 07:44
Changes:
 * Include toggle keyboard action in game menu
 * Add generic game input device abstraction (which can be implemented
   by all kind of input devices)
 * Show input device game menu options
   * Implement for controller to provide mouse emulation selection
Changes:
 * Add withGameFocus option to game menu option to run the given
   runnable after alert dialog has been closed and the game has
   focus again.
 * use game focus option for on screen keyboard and toogle mouse
@kmreisi
Copy link
Contributor Author

kmreisi commented Jul 8, 2023

@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 kmreisi requested a review from cgutman July 8, 2023 07:03
@tlusk
Copy link
Contributor

tlusk commented Jul 10, 2023

@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.

@dangnm
Copy link

dangnm commented Sep 17, 2023

@cgutman any updates on this PR? :D

@cgutman
Copy link
Member

cgutman commented Sep 17, 2023

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.

@mattvgm
Copy link
Contributor

mattvgm commented Oct 21, 2023

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

@Danik1601
Copy link

Danik1601 commented Jan 25, 2024

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.

@mattvgm
Copy link
Contributor

mattvgm commented Jan 26, 2024

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

@kmreisi
Copy link
Contributor Author

kmreisi commented Jan 29, 2024

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 ? ;-)

@moi952
Copy link

moi952 commented Apr 17, 2024

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

@moi952
Copy link

moi952 commented Apr 19, 2024

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

This one #1219 is related, it would be great to be able to pass both if possible :)
Thanks

@StanLindsey
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants