Add hacky workaround to fix Meta Quest flickering
Scrcpy captures the screen first using the `DisplayManager` API, and if
that fails, it falls back to the `SurfaceControl` API.
On the Meta Quest 3, `DisplayManager` initialization throws a
`RuntimeException` with the message:
createVirtualDisplay failed. See logcat for error
After this, scrcpy falls back to the `SurfaceControl` API, which starts
mirroring the screen.
The problem is that although `createVirtualDisplay()` throws a
`RuntimeException`, a mirroring session was started anyway.
Consequently, the fallback via `SurfaceControl` starts a second
mirroring session to the same Surface, causing flickering.
On Meta Quest, assume that the mirroring started successfully and create
a dummy virtual display instance that wraps the surface.
Refs #5913 comment <https://github.com/Genymobile/scrcpy/issues/5913#issuecomment-3677889916>
Fixes #5913 <https://github.com/Genymobile/scrcpy/issues/5913> R
Romain Vimont committed
d3ffab9d7489af6cc0533adeb43e3cfa5b128c81
Parent: cd6343e