0
0
Fork 0
mirror of https://github.com/ZDoom/raze-gles.git synced 2025-01-15 20:20:54 +00:00
raze-gles/source/platform/posix/sdl/i_system.mm

20 lines
589 B
Text
Raw Normal View History

#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 );
}
}