fix(clipboard): fix missing return type of macOS. Fix #826
This commit is contained in:
parent
63b56c09ed
commit
665790e8f5
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user