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

[Android Editor] Update the options for launching the Play window in PiP mode #96340

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Aug 30, 2024

Follow-up from #95700 (comment)

This PR adds a new mode to launch the Play window directly in picture-in-picture (PiP) mode.

Screen_Recording_20240830_103034.mp4

@m4gr3d
Copy link
Contributor Author

m4gr3d commented Aug 30, 2024

cc @arutemu

@arutemu
Copy link

arutemu commented Aug 30, 2024

@m4gr3d Thank you! PiP works like a charm :)

However, there is an issue that may be out of the scope of this exact change - the hardware controls (keyboard/gamepad) do not work with the game running in PiP mode.
To clarify - the same HW input works fine outside of PiP mode.

I understand that touch controls are not supposed to work in PiP mode, as stated in #95700.
But what about HW?
Is it some Android OS limitation, or may it be implemented? (or it works, just not on my side?..)
Device - Galaxy Tab S8, Android 14.

UPD.
It seems like HW controls actually do interact with the game running in PiP mode, however, not in the expected way.
Basically you can interact with the PiP window buttons (using arrow keys and enter, etc.)
Screenshot_20240831_002141

@akien-mga akien-mga merged commit 4ab3584 into godotengine:master Sep 4, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@m4gr3d See above question about gamepad input. Should that be filed in a new issue?

@m4gr3d m4gr3d deleted the update_pip_mode_options branch September 5, 2024 13:50
@m4gr3d
Copy link
Contributor Author

m4gr3d commented Sep 5, 2024

Is it some Android OS limitation, or may it be implemented? (or it works, just not on my side?..)

@arutemu @akien-mga I checked and it's an Android limitation. The content in the window running in PiP mode doesn't get any input events, the only exception being the PiP buttons used to restore full screen or close the PiP window, which matches the behavior you're seeing.

PiP mode was originally created for media watching while multi-tasking so those restrictions make sense in that context. Hopefully future versions of Android will expand the input capabilities for PiP windows.

@arutemu
Copy link

arutemu commented Sep 5, 2024

@m4gr3d than you for the reply!

It's a bit sad result, to be fair, as it makes PiP mode almost useless for any dynamic scenes.
However, it would still be quite useful for checking static scenes.

Just one more question - maybe there is some workaround for passing the HW inputs from the editor to the PiP window? Or any other way to update the game data?
Because, while the PiP window is quite limiting, there is an example of the app that is used not for media playback and that shows the real time changes - Google Maps (example here).

@Calinou
Copy link
Member

Calinou commented Sep 5, 2024

Just one more question - maybe there is some workaround for passing the HW inputs from the editor to the PiP window? Or any other way to update the game data?

Something like this will be needed for embedding the game window within the editor. It shouldn't be too difficult to implement right now if all you need is input forwarding.

Touch and mouse motion events might be more difficult due to the captured and confined mouse modes, but keyboard and gamepad1 should be straightforward.

Footnotes

  1. On desktop platforms, unfocused windows always receive gamepad events, but this is not the case on Android as far as I can tell.

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

Successfully merging this pull request may close these issues.

4 participants