Browse Source

mac-virtualcam: DAL PlugIn check for custom png file

pedanticdan 4 years ago
parent
commit
bc3decc8d1
1 changed files with 9 additions and 0 deletions
  1. 9 0
      plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm

+ 9 - 0
plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm

@@ -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];