-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support external monitor #220
Comments
I have recently implemented external screen support in my app, Present Anything. I can make it happen for UTM app, but I have a few questions. The iOS external screen API (including on iOS 14) is UIKit based, you basically provide a UIWindow to the external screen to display. It is possible to change the resolution of the ext. screen (iOS defaults to the max supported by the device and screen).
|
I see a couple of main steps mostly from reading https://www.spice-space.org/multiple-monitors.html which gives a high level view of how SPICE handles multiple monitors. CSDisplayMetal is the interface between libspice-gtk and the Metal rendering. So here, we have to handle notifying SPICE server that a new display arrived with some dimension. This is also where the pixel framebuffer is copied to a Metal texture. That would have to be extended to handle multiple textures representing each display and/or a mapping of texture to displays if we support display mirroring. We also need some sort of syncing with CSInput which handles the cursor position. UTMRenderer does the Metal rendering which renders both the display and cursor through delegate calls to CSDisplayMetal and CSInput. A MTKView uses UTMRenderer. VMDisplayMetalController hosts the MTKView. VMDisplayMetalController also does the touch inputs, keyboard handling, etc. So VMDisplayMetalController (or VMDisplayTerminalController) would be good candidates to move to UIWindow. Without SPICE agent installed, the only thing we can do is mirror or move the display to the external display. For extending the display, the guest has to be aware of the SPICE protocol. I think in the case of tablet/pencil mode cursor, it is fine to not be able to input on the external display. Also, for new files and features, I would prefer moving to Swift from this point on. |
I have added experimental iOS external screen support, with new files written in Swift. I need help with the external VMDisplayMetalViewController to get mirroring and (potentially) multiple displays working. See my pull request. Additionally, currently the aspect ratio of the VM display becomes distorted when it moves back from external to internal screen. Here'a a very short video demoing Windows XP on an external screen connected to my iPad Pro. 😄 |
iPad allows an external monitor to be used as a separate display.
The text was updated successfully, but these errors were encountered: