Update Mac.mm

This commit is contained in:
Mihai Alexandru
2024-04-22 17:00:28 +03:00
committed by GitHub
parent 2f1f05b4ed
commit a95988dbeb
+10 -3
View File
@@ -112,10 +112,17 @@ namespace ExternalMac
cursor = customCursorCache[cursorImageName.UTF8String];
else
{
NSString *cursorImageName = [NSString stringWithUTF8String:customCursor];
NSImage *tmpImage = [NSImage imageNamed:cursorImageName];
cursor = [[NSCursor alloc] initWithImage:tmpImage hotSpot:NSMakePoint(customX, customY)];
customCursorCache[cursorImageName.UTF8String] = cursor;
// [tmpImage release];
if (tmpImage != nullptr)
{
cursor = [[NSCursor alloc] initWithImage:tmpImage hotSpot:NSMakePoint(customX, customY)];
customCursorCache[customCursor] = cursor;
// [tmpImage release];
}
else
NSLog(@"Failed to load image %@", cursorImageName);
}
break;