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