#include "sys_osx.h"

#import <Cocoa/Cocoa.h>	/* NSRunCriticalAlertPanel() */

#ifndef DEDICATED_ONLY
/* Display message from Sys_Error() on a window: */
void Cocoa_ErrorMessage (const char *errorMsg)
{
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1040)	/* ppc builds targeting 10.3 and older */
    NSString* msg = [NSString stringWithCString:errorMsg];
#else
    NSString* msg = [NSString stringWithCString:errorMsg encoding:NSASCIIStringEncoding];
#endif
    NSRunCriticalAlertPanel (@"SiN Error", msg, @"OK", nil, nil);
}
#endif
