fix(clipboard): fix missing return type of macOS. Fix #826

This commit is contained in:
Federico Terzi 2021-11-01 11:41:33 +01:00
parent 63b56c09ed
commit 665790e8f5

View File

@ -44,7 +44,11 @@ int32_t clipboard_set_text(char * text) {
[pasteboard declareTypes:array owner:nil]; [pasteboard declareTypes:array owner:nil];
NSString *nsText = [NSString stringWithUTF8String:text]; NSString *nsText = [NSString stringWithUTF8String:text];
[pasteboard setString:nsText forType:NSPasteboardTypeString]; if (![pasteboard setString:nsText forType:NSPasteboardTypeString]) {
return 0;
}
return 1;
} }
int32_t clipboard_set_image(char * image_path) { int32_t clipboard_set_image(char * image_path) {