From d6cc6ee452633ebfe7f587bf8d51edf38652ee54 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 3 Aug 2014 12:26:17 +0300 Subject: [PATCH] Added notification dialog in case of fatal error --- src/sdl/i_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 27324edf6..3e199a165 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -75,6 +75,10 @@ extern "C" int cc_install_handlers(int, char**, int, int*, const char*, int(*)(char*, char*)); +#ifdef __APPLE__ +void Mac_I_FatalError(const char* errortext); +#endif + // PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- // PRIVATE FUNCTION PROTOTYPES --------------------------------------------- @@ -356,6 +360,11 @@ int main (int argc, char **argv) I_ShutdownJoysticks(); if (error.GetMessage ()) fprintf (stderr, "%s\n", error.GetMessage ()); + +#ifdef __APPLE__ + Mac_I_FatalError(error.GetMessage()); +#endif // __APPLE__ + exit (-1); } catch (...)