From eec4a9281aa891a43045ba9e6eedd2ac96499c0d Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Thu, 21 Nov 2024 19:34:51 +0900 Subject: [PATCH 1/3] fixed issue #175 --- virtualization_view.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtualization_view.m b/virtualization_view.m index 1e6e3f2..ffb04f8 100644 --- a/virtualization_view.m +++ b/virtualization_view.m @@ -454,6 +454,7 @@ - (void)setupGraphicWindow - (NSSize)getVirtualMachineSizeInPixels { __block NSSize sizeInPixels; +#ifdef INCLUDE_TARGET_OSX_14 if (@available(macOS 14.0, *)) { dispatch_sync(_queue, ^{ if (_virtualMachine.graphicsDevices.count > 0) { @@ -465,6 +466,7 @@ - (NSSize)getVirtualMachineSizeInPixels } }); } +#endif return sizeInPixels; } From 1a023372f5ac786445f1ad23905577d4f5a762da Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Thu, 21 Nov 2024 22:25:04 +0900 Subject: [PATCH 2/3] initialize with NSZeroSize --- virtualization_view.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualization_view.m b/virtualization_view.m index ffb04f8..def2842 100644 --- a/virtualization_view.m +++ b/virtualization_view.m @@ -453,7 +453,7 @@ - (void)setupGraphicWindow // distortion within the window. - (NSSize)getVirtualMachineSizeInPixels { - __block NSSize sizeInPixels; + __block NSSize sizeInPixels = NSZeroSize; #ifdef INCLUDE_TARGET_OSX_14 if (@available(macOS 14.0, *)) { dispatch_sync(_queue, ^{ From 5d02d82fb1a39d11ac1384300402a6674164a457 Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Thu, 21 Nov 2024 22:29:59 +0900 Subject: [PATCH 3/3] import virtualization_helper.h in virtualization_view.h --- virtualization_view.h | 1 + 1 file changed, 1 insertion(+) diff --git a/virtualization_view.h b/virtualization_view.h index 09766a7..3b81b28 100644 --- a/virtualization_view.h +++ b/virtualization_view.h @@ -6,6 +6,7 @@ #pragma once +#import "virtualization_helper.h" #import #import #import