OSDN Git Service

CLI: Missed file from SubRip - a symptom of too many views and patches
[handbrake-jp/handbrake-jp-git.git] / macosx / main.mm
index 7880214..9927a44 100644 (file)
@@ -1,10 +1,11 @@
 /* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
 
    This file is part of the HandBrake source code.
-   Homepage: <http://handbrake.m0k.org/>.
+   Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License. */
 
 #include <Cocoa/Cocoa.h>
+#import "hb.h"
 
 void SigHandler( int signal )
 {
@@ -20,12 +21,13 @@ void SigHandler( int signal )
 extern "C" {
 void hb_error_handler( const char *errmsg )
 {
-    fprintf(stderr, "ERROR: %s\n", errmsg );
+    fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg );
 }
 }
 
 int main( int argc, const char ** argv )
 {
     signal( SIGINT, SigHandler );
+    hb_register_error_handler(&hb_error_handler);
     return NSApplicationMain( argc, argv );
 }