]> git.r.bdr.sh - rbdr/captura/blobdiff - Captura/CapturaApp.swift
Save WIP -> Multimonitor change working
[rbdr/captura] / Captura / CapturaApp.swift
index 0d22e79e76f2d98947cc087a8eb73abe7390a4ac..67709a5df051374cad5322d3fe54b20fe7f7e972 100644 (file)
@@ -326,7 +326,10 @@ struct CapturaApp: App {
     if now - gifCallbackTimer > .nanoseconds(1_000_000_000 / UInt64(captureSessionConfiguration.frameRate)) {
       gifCallbackTimer = now
       DispatchQueue.main.async {
-        if let cgImage = frame.cgImage?.resize(by: self.pixelDensity) {
+        if var cgImage = frame.cgImage {
+          if self.pixelDensity > 1 {
+            cgImage = cgImage.resize(by: self.pixelDensity) ?? cgImage
+          }
           self.images.append(cgImage)
         }
       }