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

[WIP] External display support on Android #12132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imxieyi
Copy link
Contributor

@imxieyi imxieyi commented Jun 25, 2019

Just like iOS (#12094), Android also supports external displays (via Miracast, HDMI, etc.). As mentioned by @unknownbrackets, this gives more reason to separate virtual gamepad from game view. I don't have a decent Android device to test. It currently works with virtual display in Android Emulator:

image

This utilizes Presentation API. There are several similarities about external display support on iOS and Android:

  • Each display has its own root Context(Android) or UIViewController(iOS).
  • Just like GLKView on iOS, SurfaceView on Android can be easily moved from one display to another.
  • A listener can be setup to monitor display plugging and unplugging.

@Florin9doi
Copy link
Contributor

The menus should also remain on the primary display, together with the virtual gamepad. Otherwise, there wont be any way to use them. Just the game view can be moved to a secondary display.

@WeedyWeedSmoker
Copy link

@Florin9doi I think the menus should be on the external screen : if you play on a TV, you probably use a joystick for that purpose — and navigating the menus directly with the joystick is easier if they show up on the big screen...

@Florin9doi
Copy link
Contributor

@WeedyWeedSmoker, what you ask for is the way how it already works right now.

@WeedyWeedSmoker
Copy link

@Florin9doi Yeah, just voicing some opinion over here... 😄 I've seen cases where the changes have been implemented by request, where the "old" behavior was in fact better for some people... Wouldn't mind if that was an option though ! (Maybe only after actually implementing the virtual gamepad)

@unknownbrackets
Copy link
Collaborator

The way I see it, the ideal thing would be to show menus on both. That might be harder, but I'm thinking:

  • Virtual controls only on device.
  • Game only on display (or potentially on both, but this might have worse performance, so at least an option...)
  • Menus on both display and device.
  • FPS and debug menus only on device? Optionally both?
  • On-screen messages only on display or both.

I wonder how the GL here actually works. The Android docs seem pretty light here - unclear if it's a separate GL context or separate threads or what.

-[Unknown]

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.

None yet

4 participants