os/macosx/macos.h
changeset 2223 b9564d70ec3d
parent 2188 640a0a5f77ea
child 2847 65c54f935db6
equal deleted inserted replaced
2222:ce4beae3ce18 2223:b9564d70ec3d
     1 #ifndef MACOS_H
     1 #ifndef MACOS_H
     2 #define MACOS_H
     2 #define MACOS_H
     3 
     3 
     4 void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel );
     4 void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel );
       
     5 void ShowMacAssertDialog ( const char *function, const char *file, const int line, const char *expression );
       
     6 
       
     7 // Since MacOS X users will never see an assert unless they started the game from a terminal
       
     8 // we're using a custom assert(e) macro.
       
     9 #undef assert
       
    10 
       
    11 #ifdef NDEBUG
       
    12 #define assert(e)       ((void)0)
       
    13 #else
       
    14 
       
    15 #define assert(e) \
       
    16 		(__builtin_expect(!(e), 0) ? ShowMacAssertDialog ( __func__, __FILE__, __LINE__, #e ): (void)0 )
       
    17 #endif
     5 
    18 
     6 #endif /* MACOS_H */
    19 #endif /* MACOS_H */