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.
This commit is contained in:
Ryan C. Gordon 2009-09-16 12:54:12 +00:00
parent 083bd1b005
commit 5ffb45c79f
3 changed files with 4 additions and 3 deletions

View file

@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#import <Cocoa/Cocoa.h>
void Sys_Cocoa_MsgBox( const char *text )
void Cocoa_MsgBox( const char *text )
{
NSRunInformationalAlertPanel(@"ioquake3",
[NSString stringWithUTF8String:text],

View file

@ -46,7 +46,6 @@ unsigned int CON_LogRead( char *out, unsigned int outSize );
#ifdef MACOS_X
char *Sys_StripAppBundle( char *pwd );
void Sys_Cocoa_MsgBox( const char *text );
#endif
void Sys_GLimpSafeInit( void );

View file

@ -511,8 +511,10 @@ void Sys_ErrorDialog( const char *error )
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... */