mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-14 22:51:42 +00:00
20 lines
589 B
Text
20 lines
589 B
Text
|
#include <CoreFoundation/CoreFoundation.h>
|
||
|
#include "SDL.h"
|
||
|
|
||
|
void Mac_I_FatalError(const char* errortext)
|
||
|
{
|
||
|
// Close window or exit fullscreen and release mouse capture
|
||
|
SDL_Quit();
|
||
|
|
||
|
const CFStringRef errorString = CFStringCreateWithCStringNoCopy( kCFAllocatorDefault,
|
||
|
errortext, kCFStringEncodingASCII, kCFAllocatorNull );
|
||
|
if ( NULL != errorString )
|
||
|
{
|
||
|
CFOptionFlags dummy;
|
||
|
|
||
|
CFUserNotificationDisplayAlert( 0, kCFUserNotificationStopAlertLevel, NULL, NULL, NULL,
|
||
|
CFSTR( "Fatal Error" ), errorString, CFSTR( "Exit" ), NULL, NULL, &dummy );
|
||
|
CFRelease( errorString );
|
||
|
}
|
||
|
}
|