diff --git a/.gitignore b/.gitignore index 749c8877..ec489dea 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,6 @@ fastlane/test_output iOSInjectionProject/ -build/ +build*/ sysroot*/ .DS_Store 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))")