[quake3-commits] r1631 - trunk/code/sys

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Sep 16 08:54:13 EDT 2009


Author: icculus
Date: 2009-09-16 08:54:12 -0400 (Wed, 16 Sep 2009)
New Revision: 1631

Modified:
   trunk/code/sys/sys_cocoa.m
   trunk/code/sys/sys_local.h
   trunk/code/sys/sys_unix.c
Log:
Cleanups for the Mac error dialog, after a code review from tma.

- Don't expose the function in sys_local.h (it would be static if we could).
- Don't call it Sys_Cocoa_*; it'd be nonsense with q3a's naming conventions.



Modified: trunk/code/sys/sys_cocoa.m
===================================================================
--- trunk/code/sys/sys_cocoa.m	2009-09-16 09:30:21 UTC (rev 1630)
+++ trunk/code/sys/sys_cocoa.m	2009-09-16 12:54:12 UTC (rev 1631)
@@ -29,7 +29,7 @@
 
 #import <Cocoa/Cocoa.h>
 
-void Sys_Cocoa_MsgBox( const char *text )
+void Cocoa_MsgBox( const char *text )
 {
 	NSRunInformationalAlertPanel(@"ioquake3", 
 	                             [NSString stringWithUTF8String:text],

Modified: trunk/code/sys/sys_local.h
===================================================================
--- trunk/code/sys/sys_local.h	2009-09-16 09:30:21 UTC (rev 1630)
+++ trunk/code/sys/sys_local.h	2009-09-16 12:54:12 UTC (rev 1631)
@@ -46,7 +46,6 @@
 
 #ifdef MACOS_X
 char *Sys_StripAppBundle( char *pwd );
-void Sys_Cocoa_MsgBox( const char *text );
 #endif
 
 void Sys_GLimpSafeInit( void );

Modified: trunk/code/sys/sys_unix.c
===================================================================
--- trunk/code/sys/sys_unix.c	2009-09-16 09:30:21 UTC (rev 1630)
+++ trunk/code/sys/sys_unix.c	2009-09-16 12:54:12 UTC (rev 1631)
@@ -511,8 +511,10 @@
 	Sys_Print( va( "%s\n", error ) );
 
 #if defined(MACOS_X) && !DEDICATED
+	/* This function has to be in a separate file, compiled as Objective-C. */
+	extern void Cocoa_MsgBox( const char *text );
 	if (!com_dedicated || !com_dedicated->integer)
-		Sys_Cocoa_MsgBox(error);
+		Cocoa_MsgBox(error);
 #endif
 
 	/* make sure the write path for the crashlog exists... */



More information about the quake3-commits mailing list