mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphicsdriver/metal: Specify macOS version (#768)
This commit is contained in:
parent
61afdc8852
commit
a0a17330ee
@ -28,6 +28,7 @@ import (
|
||||
"github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal/mtl"
|
||||
)
|
||||
|
||||
// #cgo CFLAGS: -mmacosx-version-min=10.11
|
||||
// #cgo LDFLAGS: -framework QuartzCore -framework Foundation -framework CoreGraphics
|
||||
//
|
||||
// #include "ca.h"
|
||||
|
@ -59,7 +59,9 @@ const char *MetalLayer_SetMaximumDrawableCount(void *metalLayer,
|
||||
|
||||
void MetalLayer_SetDisplaySyncEnabled(void *metalLayer,
|
||||
BOOL displaySyncEnabled) {
|
||||
((CAMetalLayer *)metalLayer).displaySyncEnabled = displaySyncEnabled;
|
||||
if (@available(macOS 10.13, *)) {
|
||||
((CAMetalLayer *)metalLayer).displaySyncEnabled = displaySyncEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
void MetalLayer_SetDrawableSize(void *metalLayer, double width, double height) {
|
||||
|
@ -30,6 +30,7 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// #cgo CFLAGS: -mmacosx-version-min=10.11
|
||||
// #cgo LDFLAGS: -framework Metal -framework Foundation
|
||||
//
|
||||
// #include <stdlib.h>
|
||||
|
@ -27,6 +27,8 @@ import (
|
||||
"github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal/ca"
|
||||
)
|
||||
|
||||
// #cgo CFLAGS: -mmacosx-version-min=10.11
|
||||
//
|
||||
// #include "ns.h"
|
||||
import "C"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user