mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 09:09:29 +01:00
Android: Show the game on a second display, with the controls on the phone
A presentation display (HDMI or USB-C video out, some wireless displays, or the simulated ones in Developer options) gets a Presentation with a SurfaceView, whose surface becomes a Game output, when the backend is Vulkan. Otherwise Android keeps mirroring. The surface mustn't be touched after surfaceDestroyed returns, so the output is removed with the new Native_RemoveOutputAndWait(), which returns once the render thread has let go of it (or right away if the graphics are down). The UI drawn on an output now leaves out the main swapchain's pre-rotation, as the game already did. "In menus on %1" gets the device name from Settings.Global.DEVICE_NAME. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f6fa84329e
commit
5fbd134a7d
10 files changed
+265
-10
No files matched your search
@@ -120,7 +120,7 @@ void DisplayProperties::Print() {
|
||||
}
|
||||
|
||||
// Y-flip compensation is done elsewhere now.
|
||||
Lin::Matrix4x4 ComputeOrthoMatrix(float xres, float yres, CoordConvention coordConvention) {
|
||||
Lin::Matrix4x4 ComputeOrthoMatrix(float xres, float yres, CoordConvention coordConvention, bool rotateToDisplay) {
|
||||
using namespace Lin;
|
||||
Matrix4x4 ortho;
|
||||
switch (coordConvention) {
|
||||
@@ -134,7 +134,7 @@ Lin::Matrix4x4 ComputeOrthoMatrix(float xres, float yres, CoordConvention coordC
|
||||
break;
|
||||
}
|
||||
// Compensate for rotated display if needed.
|
||||
if (g_display.rotation != DisplayRotation::ROTATE_0) {
|
||||
if (rotateToDisplay && g_display.rotation != DisplayRotation::ROTATE_0) {
|
||||
ortho = ortho * g_display.rot_matrix;
|
||||
}
|
||||
return ortho;
|
||||
|
||||
Reference in new issue
Block a user