1.1 --- a/src/main.c Sun Jan 22 22:40:53 2006 +0000
1.2 +++ b/src/main.c Mon Mar 13 12:39:07 2006 +0000
1.5 - * $Id: main.c,v 1.12 2006-01-22 22:40:53 nkeynes Exp $
1.6 + * $Id: main.c,v 1.13 2006-02-05 04:05:27 nkeynes Exp $
1.8 * Main program, initializes dreamcast and gui, then passes control off to
1.9 * the gtk main loop (currently).
1.11 #ifdef HAVE_CONFIG_H
1.12 # include <config.h>
1.16 +#include <getopt.h>
1.18 #include "gui/gui.h"
1.21 #define S3M_PLAYER "s3mplay.bin"
1.23 char *option_list = "a:s:A:V:phb";
1.24 +struct option longopts[1] = { { NULL, 0, 0, 0 } };
1.25 char *aica_program = NULL;
1.26 char *s3m_file = NULL;
1.27 gboolean start_immediately = FALSE;
1.29 textdomain (PACKAGE);
1.32 - while( (opt = getopt( argc, argv, option_list )) != -1 ) {
1.33 + while( (opt = getopt_long( argc, argv, option_list, longopts, NULL )) != -1 ) {
1.35 case 'a': /* AICA only mode - argument is an AICA program */
1.36 aica_program = optarg;
1.40 if( aica_program == NULL ) {
1.43 gnome_init ("dreamon", VERSION, argc, argv);
1.46 dreamcast_register_module( >k_gui_module );
1.51 dreamcast_configure_aica_only();
1.55 INFO( "DreamOn! ready..." );
1.56 + if( optind < argc ) {
1.57 + file_load_magic( argv[optind] );
1.60 if( start_immediately )