Browse Source

mac-virtualcam: Treat extension installation cancellation as error

OSSystemExtensionErrorRequestCanceled is called when the activation
delegate returns OSSystemExtensionReplacementActionCancel on request
actionForReplacingExtension withExtension. As per the previous (parent)
commit we no longer request cancellation, so we can be sure that
receiving a "cancelled" error is an actual error and not something that
is supposed to happen.
This commit also removes the "error" from the log prefix, as the message
sent may also be a warning instead, and the LOG_LEVEL conveys the
severity of the log line anyways.
gxalpha 2 years ago
parent
commit
1781289f22
1 changed files with 1 additions and 5 deletions
  1. 1 5
      plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm

+ 1 - 5
plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm

@@ -77,10 +77,6 @@ struct virtualcam_data {
     int severity;
     int severity;
 
 
     switch (error.code) {
     switch (error.code) {
-        case OSSystemExtensionErrorRequestCanceled:
-            errorMessage = @"macOS Camera Extension installation request cancelled.";
-            severity = LOG_INFO;
-            break;
         case OSSystemExtensionErrorUnsupportedParentBundleLocation:
         case OSSystemExtensionErrorUnsupportedParentBundleLocation:
             self.lastErrorMessage =
             self.lastErrorMessage =
                 [NSString stringWithUTF8String:obs_module_text("Error.SystemExtension.WrongLocation")];
                 [NSString stringWithUTF8String:obs_module_text("Error.SystemExtension.WrongLocation")];
@@ -95,7 +91,7 @@ struct virtualcam_data {
             break;
             break;
     }
     }
 
 
-    blog(severity, "mac-camera-extension error: %s", errorMessage.UTF8String);
+    blog(severity, "mac-camera-extension: %s", errorMessage.UTF8String);
 }
 }
 
 
 - (void)request:(nonnull OSSystemExtensionRequest *)request didFinishWithResult:(OSSystemExtensionRequestResult)result
 - (void)request:(nonnull OSSystemExtensionRequest *)request didFinishWithResult:(OSSystemExtensionRequestResult)result