diff --git a/Config.xcconfig b/Config.xcconfig index 4fa6f77..33c8fa8 100644 --- a/Config.xcconfig +++ b/Config.xcconfig @@ -7,7 +7,7 @@ VERSION = 0.1 -BUILD = 1 +BUILD = 2 // Configuration settings file format documentation can be found at: // https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project diff --git a/Scream/ScreenRecorder.swift b/Scream/ScreenRecorder.swift index 782d8b8..3cc41d4 100644 --- a/Scream/ScreenRecorder.swift +++ b/Scream/ScreenRecorder.swift @@ -26,6 +26,7 @@ class ScreenRecorder: NSObject { //// } // filter = SCContentFilter(display: availableContent.displays.first!, excludingApplications: excludedApps, exceptingWindows: []) // } + var scaleFactor: Int { Int(NSScreen.main?.backingScaleFactor ?? 2) } var streamConfig: SCStreamConfiguration { var streamConfig = SCStreamConfiguration() @@ -34,10 +35,10 @@ class ScreenRecorder: NSObject { // streamConfig.excludesCurrentProcessAudio = false // streamConfig.captureMicrophone = true - streamConfig.width = Int(NSScreen.main?.frame.width ?? 100) - streamConfig.height = Int(NSScreen.main?.frame.height ?? 100) + streamConfig.width = Int(NSScreen.main?.frame.width ?? 100) * scaleFactor + streamConfig.height = Int(NSScreen.main?.frame.height ?? 100) * scaleFactor - streamConfig.minimumFrameInterval = CMTime(value: 1, timescale: 20) + streamConfig.minimumFrameInterval = CMTime(value: 1, timescale: 60) streamConfig.queueDepth = 5 return streamConfig }