[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Collapse multiple CPS checks in Run into one if

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Jul 22 09:10:18 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
623b9db2 by Claudio Cambra at 2023-07-22T08:54:13+00:00
macosx: Collapse multiple CPS checks in Run into one if

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
34b0854c by Claudio Cambra at 2023-07-22T08:54:13+00:00
macosx: Use result for NSApplication.sharedApplication in main Run, give error message

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
8c569859 by Claudio Cambra at 2023-07-22T08:54:13+00:00
macosx: Update error message for error to initialise minimal interface

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/minimal_macosx/intf.m


Changes:

=====================================
modules/gui/minimal_macosx/intf.m
=====================================
@@ -87,11 +87,13 @@ static void Run(intf_thread_t *p_intf)
 {
     CPSProcessSerNum PSN;
     @autoreleasepool {
-        NSApplication.sharedApplication;
-        if (!CPSGetCurrentProcess(&PSN))
-            if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
-                if (!CPSSetFrontProcess(&PSN))
-                    NSApplication.sharedApplication;
+        NSApplication *application = NSApplication.sharedApplication;
+        if (!CPSGetCurrentProcess(&PSN) && !CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103) && !CPSSetFrontProcess(&PSN)) {
+            application = NSApplication.sharedApplication;
+        } else {
+            msg_Err(p_intf, "Failed to start VLC minimal interface");
+            return;
+        }
     }
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/deffa06e90c14a0fc12f5da4cacf0b0d115d4c88...8c569859a0b36b438bd4979c3f96e91bed55a88b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/deffa06e90c14a0fc12f5da4cacf0b0d115d4c88...8c569859a0b36b438bd4979c3f96e91bed55a88b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list