Put this around an ifdef

This commit is contained in:
twinaphex 2018-06-21 08:26:11 +02:00
parent c0beef8365
commit 837cf84fc8
1 changed files with 3 additions and 1 deletions

View File

@ -257,13 +257,15 @@ static char** waiting_argv;
switch (vt) { switch (vt) {
case APPLE_VIEW_TYPE_VULKAN: case APPLE_VIEW_TYPE_VULKAN:
case APPLE_VIEW_TYPE_METAL: case APPLE_VIEW_TYPE_METAL:
#if defined(HAVE_METAL) || defined(HAVE_VULKAN)
{ {
NSView *v = [CocoaView get]; NSView *v = [CocoaView get];
v.wantsLayer = YES; v.wantsLayer = YES;
v.layer = CAMetalLayer.layer; v.layer = CAMetalLayer.layer;
_renderView = v; _renderView = v;
break;
} }
#endif
break;
case APPLE_VIEW_TYPE_OPENGL: case APPLE_VIEW_TYPE_OPENGL:
{ {