mac-virtualcam: DAL PlugIn check for custom png file

This commit is contained in:
pedanticdan 2021-02-28 14:47:15 -07:00 committed by Jim
parent 6a9f25c8ea
commit bc3decc8d1

View File

@ -170,6 +170,15 @@
NSString *placeHolderPath = [bundlePath
stringByAppendingString:
@"/Contents/Resources/placeholder.png"];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *homeUrl = [fileManager homeDirectoryForCurrentUser];
NSURL *customUrl = [homeUrl
URLByAppendingPathComponent:
@"Library/Application Support/obs-studio/plugin_config/mac-virtualcam/placeholder.png"];
NSString *customPlaceHolder = customUrl.path;
if ([fileManager isReadableFileAtPath:customPlaceHolder])
placeHolderPath = customPlaceHolder;
DLog(@"PlaceHolder:%@", placeHolderPath);
NSImage *placeholderImage = [[NSImage alloc]
initWithContentsOfFile:placeHolderPath];