X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2Fmain.mm;h=5f73a0c6059823c6bc2417eb2c63d97178b8b115;hb=4f0019f03c2e85e8634150ff0c9a31bee6d35ce5;hp=b07c7f1c8dfa75fa2fd806e47fba8be2e589ebbe;hpb=04da1b33c40dc000a2e649bfdb24f9a8e0b093fc;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/macosx/main.mm b/macosx/main.mm
index b07c7f1c..5f73a0c6 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,18 +1,39 @@
/* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
This file is part of the HandBrake source code.
- Homepage: .
+ Homepage: .
It may be used under the terms of the GNU General Public License. */
#include
+#import "hb.h"
void SigHandler( int signal )
{
[NSApp terminate: NULL];
}
+/****************************************************************************
+ * hb_error_handler
+ *
+ * Change this to display a dialog box - and maybe move it somewhere else,
+ * this is the only place I could find that looked like C :)
+****************************************************************************/
+extern "C" {
+void hb_error_handler( const char *errmsg )
+{
+ fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg );
+}
+}
+
+extern "C" {
+extern int mm_flags;
+int mm_support();
+}
+
int main( int argc, const char ** argv )
{
+ mm_flags = mm_support();
signal( SIGINT, SigHandler );
+ hb_register_error_handler(&hb_error_handler);
return NSApplicationMain( argc, argv );
}