Fix crash in vkCreateSwapchainKHR() on macOS 10.14 and earlier
This commit is contained in:
parent
d447ea7940
commit
07ac3c8603
@ -402,10 +402,12 @@ void MVKSwapchain::initSurfaceImages(const VkSwapchainCreateInfoKHR* pCreateInfo
|
||||
_presentableImages.push_back(_device->createPresentableSwapchainImage(&imgInfo, this, imgIdx, NULL));
|
||||
}
|
||||
|
||||
#if MVK_MACOS && !MVK_MACCAT
|
||||
NSString* screenName = _mtlLayer.screenMVK.localizedName;
|
||||
#else
|
||||
NSString* screenName = @"Main Screen";
|
||||
#if MVK_MACOS && !MVK_MACCAT
|
||||
if ([_mtlLayer.screenMVK respondsToSelector:@selector(localizedName)])
|
||||
{
|
||||
screenName = _mtlLayer.screenMVK.localizedName;
|
||||
}
|
||||
#endif
|
||||
MVKLogInfo("Created %d swapchain images with initial size (%d, %d) and contents scale %.1f for screen %s.",
|
||||
imgCnt, imgExtent.width, imgExtent.height, _mtlLayer.contentsScale, screenName.UTF8String);
|
||||
|
Loading…
x
Reference in New Issue
Block a user