Skip to content

Commit

Permalink
Merge pull request #176 from Code-Hex/fix/175
Browse files Browse the repository at this point in the history
fixed to be compilable on macOS 12
  • Loading branch information
Code-Hex authored Nov 21, 2024
2 parents 9c5ca74 + 5d02d82 commit ea20e0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions virtualization_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#import "virtualization_helper.h"
#import <Availability.h>
#import <Cocoa/Cocoa.h>
#import <Virtualization/Virtualization.h>
Expand Down
4 changes: 3 additions & 1 deletion virtualization_view.m
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ - (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, ^{
if (_virtualMachine.graphicsDevices.count > 0) {
Expand All @@ -465,6 +466,7 @@ - (NSSize)getVirtualMachineSizeInPixels
}
});
}
#endif
return sizeInPixels;
}

Expand Down

0 comments on commit ea20e0a

Please sign in to comment.