From 9a1d18556d5c6e3640984a35f35b08aab7444f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 21 Nov 2024 15:29:14 +0800 Subject: [PATCH] Display: don't report screen size when display is mirrored Fix #1406 --- src/detection/displayserver/displayserver_apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/displayserver/displayserver_apple.c b/src/detection/displayserver/displayserver_apple.c index e40d25116..8f5ea3e3c 100644 --- a/src/detection/displayserver/displayserver_apple.c +++ b/src/detection/displayserver/displayserver_apple.c @@ -108,7 +108,7 @@ static void detectDisplays(FFDisplayServerResult* ds) } } - if (!physicalWidth || !physicalHeight) + if ((!physicalWidth || !physicalHeight) && CGDisplayPrimaryDisplay(screen) == screen) // #1406 { CGSize size = CGDisplayScreenSize(screen); physicalWidth = (uint32_t) (size.width + 0.5);