فهرست منبع

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 سال پیش
والد
کامیت
1781289f22
1فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  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;
 
     switch (error.code) {
-        case OSSystemExtensionErrorRequestCanceled:
-            errorMessage = @"macOS Camera Extension installation request cancelled.";
-            severity = LOG_INFO;
-            break;
         case OSSystemExtensionErrorUnsupportedParentBundleLocation:
             self.lastErrorMessage =
                 [NSString stringWithUTF8String:obs_module_text("Error.SystemExtension.WrongLocation")];
@@ -95,7 +91,7 @@ struct virtualcam_data {
             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