diff --git a/internal/gamepad/api_cf_darwin.go b/internal/gamepad/api_cf_darwin.go index da0da64db..5b7048f27 100644 --- a/internal/gamepad/api_cf_darwin.go +++ b/internal/gamepad/api_cf_darwin.go @@ -59,7 +59,7 @@ var ( ) func initializeCF() error { - corefoundation, err := purego.Dlopen("CoreFoundation.framework/CoreFoundation", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + corefoundation, err := purego.Dlopen("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if err != nil { return err } diff --git a/internal/gamepad/api_hid_darwin.go b/internal/gamepad/api_hid_darwin.go index 7d5b35857..e45ac3e9b 100644 --- a/internal/gamepad/api_hid_darwin.go +++ b/internal/gamepad/api_hid_darwin.go @@ -87,7 +87,7 @@ type ( type _IOHIDDeviceCallback func(context unsafe.Pointer, result _IOReturn, sender unsafe.Pointer, device _IOHIDDeviceRef) func initializeIOKit() error { - iokit, err := purego.Dlopen("IOKit.framework/IOKit", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + iokit, err := purego.Dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if err != nil { return err } diff --git a/internal/graphicsdriver/metal/ca/ca_darwin.go b/internal/graphicsdriver/metal/ca/ca_darwin.go index 43435f955..528dba204 100644 --- a/internal/graphicsdriver/metal/ca/ca_darwin.go +++ b/internal/graphicsdriver/metal/ca/ca_darwin.go @@ -52,7 +52,7 @@ type MetalLayer struct { // // Reference: https://developer.apple.com/documentation/quartzcore/cametallayer. func MakeMetalLayer() (MetalLayer, error) { - coreGraphics, err := purego.Dlopen("CoreGraphics.framework/CoreGraphics", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + coreGraphics, err := purego.Dlopen("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if err != nil { return MetalLayer{}, err } diff --git a/internal/graphicsdriver/metal/mtl/example_darwin_test.go b/internal/graphicsdriver/metal/mtl/example_darwin_test.go index 874da49c2..91245eccb 100644 --- a/internal/graphicsdriver/metal/mtl/example_darwin_test.go +++ b/internal/graphicsdriver/metal/mtl/example_darwin_test.go @@ -35,7 +35,7 @@ func init() { //go:cgo_import_dynamic _ _ "Metal.framework/Metal" // It is also necessary for CoreGraphics to be linked - _, _ = purego.Dlopen("CoreGraphics.framework/CoreGraphics", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + _, _ = purego.Dlopen("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", purego.RTLD_LAZY|purego.RTLD_GLOBAL) } func Example_listDevices() { diff --git a/internal/graphicsdriver/metal/mtl/mtl_darwin.go b/internal/graphicsdriver/metal/mtl/mtl_darwin.go index 5e0cdeac0..a79e60455 100644 --- a/internal/graphicsdriver/metal/mtl/mtl_darwin.go +++ b/internal/graphicsdriver/metal/mtl/mtl_darwin.go @@ -569,7 +569,7 @@ var ( // // Reference: https://developer.apple.com/documentation/metal/1433401-mtlcreatesystemdefaultdevice. func CreateSystemDefaultDevice() (Device, error) { - metal, err := purego.Dlopen("Metal.framework/Metal", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + metal, err := purego.Dlopen("/System/Library/Frameworks/Metal.framework/Metal", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if err != nil { return Device{}, err } diff --git a/internal/graphicsdriver/opengl/gl/procaddr_darwin.go b/internal/graphicsdriver/opengl/gl/procaddr_darwin.go index 31fb1303d..b18959146 100644 --- a/internal/graphicsdriver/opengl/gl/procaddr_darwin.go +++ b/internal/graphicsdriver/opengl/gl/procaddr_darwin.go @@ -25,14 +25,14 @@ var ( ) func (c *defaultContext) init() error { - lib, errGLES := purego.Dlopen("OpenGLES.framework/OpenGLES", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + lib, errGLES := purego.Dlopen("/System/Library/Frameworks/OpenGLES.framework/OpenGLES", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if errGLES == nil { c.isES = true opengl = lib return nil } - lib, errGL := purego.Dlopen("OpenGL.framework/OpenGL", purego.RTLD_LAZY|purego.RTLD_GLOBAL) + lib, errGL := purego.Dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", purego.RTLD_LAZY|purego.RTLD_GLOBAL) if errGL == nil { opengl = lib return nil