Search
lxdream.org :: lxdream/src/main.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/main.c
changeset 450:207461e79f21
prev446:def93c34c84c
next464:8e099fad42a6
author nkeynes
date Wed Oct 17 11:26:45 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Split config management out to config.[ch]
Manage config filename
Check home dir + sysconfdir for conf file
Initial work on a path settings dialog
file annotate diff log raw
1.1 --- a/src/main.c Tue Oct 16 12:28:42 2007 +0000
1.2 +++ b/src/main.c Wed Oct 17 11:26:45 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: main.c,v 1.29 2007-10-16 12:28:42 nkeynes Exp $
1.6 + * $Id: main.c,v 1.30 2007-10-17 11:26:44 nkeynes Exp $
1.7 *
1.8 * Main program, initializes dreamcast and gui, then passes control off to
1.9 * the gtk main loop (currently).
1.10 @@ -19,18 +19,16 @@
1.11 * GNU General Public License for more details.
1.12 */
1.13
1.14 -#ifdef HAVE_CONFIG_H
1.15 -# include <config.h>
1.16 -#endif
1.17 #include <unistd.h>
1.18 #include <getopt.h>
1.19 -#include "gui.h"
1.20 #include "dream.h"
1.21 +#include "config.h"
1.22 #include "syscall.h"
1.23 #include "mem.h"
1.24 #include "dreamcast.h"
1.25 #include "display.h"
1.26 #include "loader.h"
1.27 +#include "gui.h"
1.28 #include "aica/audio.h"
1.29 #include "gdrom/gdrom.h"
1.30 #include "maple/maple.h"
1.31 @@ -45,7 +43,6 @@
1.32 char *disc_file = NULL;
1.33 char *display_driver_name = "gtk";
1.34 char *audio_driver_name = "esd";
1.35 -char *config_file = DEFAULT_CONFIG_FILENAME;
1.36 gboolean start_immediately = FALSE;
1.37 gboolean headless = FALSE;
1.38 gboolean without_bios = FALSE;
1.39 @@ -79,7 +76,7 @@
1.40 aica_program = optarg;
1.41 break;
1.42 case 'c': /* Config file */
1.43 - config_file = optarg;
1.44 + lxdream_set_config_filename(optarg);
1.45 break;
1.46 case 'd': /* Mount disc */
1.47 disc_file = optarg;
1.48 @@ -124,7 +121,7 @@
1.49 }
1.50 }
1.51
1.52 - dreamcast_load_config( config_file );
1.53 + lxdream_load_config( );
1.54
1.55 if( aica_program == NULL ) {
1.56 dreamcast_init();
.