diff --git a/src/tools/cursors.mac.mm b/src/tools/cursors.mac.mm index 595882c4..e9953879 100644 --- a/src/tools/cursors.mac.mm +++ b/src/tools/cursors.mac.mm @@ -46,9 +46,8 @@ static NSImage* imageFromURL(CFURLRef url){ } Cursor::Cursor(fs::path path, float hotSpotX, float hotSpotY){ - FSRef ref; - FSPathMakeRef((UInt8*)path.c_str(), &ref, nullptr); - CFURLRef imgPath = CFURLCreateFromFSRef(nullptr, &ref); + NSString *ref = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:path.c_str() length:strlen(path.c_str())]; + CFURLRef imgPath = (CFURLRef)[NSURL fileURLWithPath:ref]; NSImage *img = imageFromURL(imgPath); NSCursor *cursor = [[NSCursor alloc] initWithImage:img hotSpot:NSMakePoint(hotSpotX, hotSpotY)];