]> git.sesse.net Git - vlc/commitdiff
* added a version check of the current Mac OS X version, as we require 10.4.x or...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 24 Oct 2007 13:25:46 +0000 (13:25 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 24 Oct 2007 13:25:46 +0000 (13:25 +0000)
modules/gui/macosx/intf.m

index 1055403caf619279e22fbebdedaf1e7e5165b4d5..58974c7a1a12d996fe764a18fa6560dc356bf59c 100644 (file)
@@ -720,6 +720,21 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_controls setupVarMenuItem: o_mi_add_intf target: (vlc_object_t *)p_intf
         var: "intf-add" selector: @selector(toggleVar:)];
 
+    /* check whether the user runs a valid version of OSX; alert is auto-released */
+    if( MACOS_VERSION < 10.5f )
+    {
+        NSAlert *ourAlert;
+        int i_returnValue;
+        ourAlert = [NSAlert alertWithMessageText: _NS("Your version of Mac OS X is not supported")
+                        defaultButton: _NS("Quit")
+                      alternateButton: NULL
+                          otherButton: NULL
+            informativeTextWithFormat: _NS("VLC media player requires Mac OS X 10.4 or higher.")];
+        [ourAlert setAlertStyle: NSCriticalAlertStyle];
+        i_returnValue = [ourAlert runModal];
+        [NSApp terminate: self];
+    }
+
     vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_LOW );
 }