Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authormfuhrer <mfuhrer>2008-02-08 03:15:44 (GMT)
committer mfuhrer <mfuhrer>2008-02-08 03:15:44 (GMT)
commit4c24db0ddd0255756bbe813bfa04a10d904a47d1 (patch)
treee0e9bb309ddc95c74094454ff911c95bf784bc76 /macosx
parent635c50fb58d86973a2aeca6d3ee1f62364e41380 (diff)
Added clean exit if user fails to enter a valid administrator password in Mac OS X authentication dialog.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/SDLMain.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/SDLMain.m b/macosx/SDLMain.m
index 76a059f..e4b7592 100644
--- a/macosx/SDLMain.m
+++ b/macosx/SDLMain.m
@@ -496,7 +496,7 @@ static void CustomApplicationMain (argc, argv)
return (BOOL)result;
}
-- (OSStatus) installFontconfigFilesWithAuthorization
+- (BOOL) installFontconfigFilesWithAuthorization
{
OSStatus status;
AuthorizationFlags flags = kAuthorizationFlagDefaults;
@@ -514,7 +514,6 @@ static void CustomApplicationMain (argc, argv)
status = AuthorizationCopyRights(authorizationRef, &rights, NULL, flags, NULL);
if (status == errAuthorizationSuccess)
-
{
NSString *fcInstallerPath = [bundle pathForAuxiliaryExecutable:@"fcinstaller"];
@@ -531,7 +530,7 @@ static void CustomApplicationMain (argc, argv)
}
AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults);
- return status;
+ return (status == errAuthorizationSuccess);
}
- (BOOL) fontconfigFilesAreInstalled
@@ -561,6 +560,9 @@ static void CustomApplicationMain (argc, argv)
if (!filesExist)
{
[self installFontconfigFilesWithAuthorization];
+ filesExist = [self fontconfigFilesAreInstalled];
+ if (!filesExist)
+ exit(-1);
}
}