diff options
author | dynaflash <[email protected]> | 2009-11-26 06:05:00 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2009-11-26 06:05:00 +0000 |
commit | cafcbe5d543e28bbe23b56fd18fe8cbc8f1c19e8 (patch) | |
tree | 1a92e45d03a51f1cdbe95a5a67cf9b329e67c84c | |
parent | 89e90f79675f8742b5b96b5eaae01367baf76c2f (diff) |
MacGui: fix vlc detection so that "Scan Anyway" works correctly ... patch by j45. Thanks John!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2984 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.m | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index bc9f4acad..62b9c380d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1539,6 +1539,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It applyQueueToScan = NO; /* use a bool to determine whether or not we can decrypt using vlc */ BOOL cancelScanDecrypt = 0; + BOOL vlcFound = 0; NSString *path = scanPath; HBDVDDetector *detector = [HBDVDDetector detectorForPath:path]; @@ -1603,6 +1604,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It { /* VLC was found in /Applications so all is well, we can carry on using vlc's libdvdcss.dylib for decrypting if needed */ [self writeToActivityLog: "VLC app found for decrypting physical dvd"]; + vlcFound = 1; } /* test for architecture of the vlc app */ NSArray *vlc_architecturesArray = [[NSBundle bundleWithPath:@"/Applications/VLC.app"] executableArchitectures]; @@ -1646,7 +1648,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - if (hb_arch == 64 && !vlcIntel64bit && cancelScanDecrypt != 1) + if (vlcFound && hb_arch == 64 && !vlcIntel64bit && cancelScanDecrypt != 1) { /* we are 64 bit */ @@ -1666,7 +1668,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [self writeToActivityLog: "cannot open physical dvd VLC found but not 64 bit, scan cancelled"]; cancelScanDecrypt = 1; } - else if (status == NSAlertDefaultReturn) + else if (status == NSAlertAlternateReturn) { [self writeToActivityLog: "user overrode 64-bit warning trying to open physical dvd without proper decryption"]; cancelScanDecrypt = 0; @@ -1678,7 +1680,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It } } - else if (hb_arch == 32 && !vlcIntel32bit && cancelScanDecrypt != 1) + else if (vlcFound && hb_arch == 32 && !vlcIntel32bit && cancelScanDecrypt != 1) { /* we are 32 bit */ /* Appropriate VLC not found, so cancel */ @@ -1696,7 +1698,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [self writeToActivityLog: "cannot open physical dvd VLC found but not 32 bit, scan cancelled"]; cancelScanDecrypt = 1; } - else if (status == NSAlertDefaultReturn) + else if (status == NSAlertAlternateReturn) { [self writeToActivityLog: "user overrode 32-bit warning trying to open physical dvd without proper decryption"]; cancelScanDecrypt = 0; |