From ba578a2efd4a50938b86c767f1f35caaf81e9775 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 3 Mar 2021 19:55:57 +0900 Subject: [PATCH 1/2] Fix resolution scaling from Cocoa to guest --- Platform/macOS/Display/VMDisplayMetalWindowController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/macOS/Display/VMDisplayMetalWindowController.swift b/Platform/macOS/Display/VMDisplayMetalWindowController.swift index 788ed070..bd85c86f 100644 --- a/Platform/macOS/Display/VMDisplayMetalWindowController.swift +++ b/Platform/macOS/Display/VMDisplayMetalWindowController.swift @@ -187,7 +187,7 @@ extension VMDisplayMetalWindowController { fileprivate func updateGuestResolution(for window: NSWindow, frameSize: NSSize) -> NSSize { guard let vmDisplay = self.vmDisplay else { return frameSize } let currentScreenScale = window.screen?.backingScaleFactor ?? 1.0 - let nativeScale = isAlwaysNativeResolution ? 1.0 : currentScreenScale + let nativeScale = isAlwaysNativeResolution ? currentScreenScale : 1.0 let targetSize = window.contentRect(forFrameRect: CGRect(origin: .zero, size: frameSize)).size let targetSizeScaled = isAlwaysNativeResolution ? targetSize.applying(CGAffineTransform(scaleX: nativeScale, y: nativeScale)) : targetSize logger.debug("Requesting resolution: (\(targetSizeScaled.width), \(targetSizeScaled.height))") From f83b8e23df24cf63084261ea72d8cfffd048a372 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 3 Mar 2021 19:56:28 +0900 Subject: [PATCH 2/2] Ignoe build-macOS-arm64 and alike --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 705f70e9..2934d907 100644 --- a/.gitignore +++ b/.gitignore @@ -67,5 +67,5 @@ fastlane/test_output iOSInjectionProject/ -build/ +build*/ sysroot*/