aboutsummaryrefslogtreecommitdiff
path: root/Captura/CapturaApp.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2023-10-19 20:57:25 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2023-10-19 20:57:25 +0200
commit9431168da5eb1338d8c9fc8cc92e6245c539e73d (patch)
tree6246898702336bce1ddcfa45de8afaaafc81fde8 /Captura/CapturaApp.swift
parent7ee43fb83799abb89a69cfcd4e2146dd4eaa5045 (diff)
Save WIP -> Multimonitor change working
Diffstat (limited to 'Captura/CapturaApp.swift')
-rw-r--r--Captura/CapturaApp.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/Captura/CapturaApp.swift b/Captura/CapturaApp.swift
index 0d22e79..67709a5 100644
--- a/Captura/CapturaApp.swift
+++ b/Captura/CapturaApp.swift
@@ -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)
}
}