External display setting: Show the game, or mirror the screen

Graphics > "External display" on iOS and Android. "Show the game" (the
default) is the TV mode, "Mirror the screen" leaves the TV to the system.
A change applies right away. It's disabled on backends that can't draw to
a second swapchain.

On Android 12 and up, a second screen that's part of the device (like a
dual-screen handheld's) isn't used, so the game doesn't move there by
itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-22 22:31:07 +02:00
1 parent 5fbd134a7d
commit 04ae3fea5b
11 files changed
+84 -16

No files matched your search

+15
View File
@@ -328,6 +328,21 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
}
#endif
#if (PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(TVOS)) || PPSSPP_PLATFORM(ANDROID)
// Showing the game there needs a second swapchain. Otherwise the system mirrors the screen.
static const char *externalDisplayModes[] = { "Show the game", "Mirror the screen" };
PopupMultiChoice *externalDisplayChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iExternalDisplay, gr->T("External display"), externalDisplayModes, 0, ARRAY_SIZE(externalDisplayModes), I18NCat::GRAPHICS, screenManager()));
externalDisplayChoice->SetEnabled(draw->GetDeviceCaps().multipleSwapchains);
// Picking the current value again would rebuild the TV's output for nothing (iOS starts over on a change).
externalDisplayChoice->OnChoice.Add([previous = g_Config.iExternalDisplay](UI::EventParams &e) mutable {
if (g_Config.iExternalDisplay == previous) {
return;
}
previous = g_Config.iExternalDisplay;
System_Notify(SystemNotification::EXTERNAL_DISPLAY_CHANGED);
});
#endif
// Backends that don't allow a device choice will only expose one device.
if (draw->GetDeviceList().size() > 1) {
std::string *deviceNameSetting = GPUDeviceNameSetting();