Search
lxdream.org :: lxdream/src/main.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/main.c
changeset 1015:ad448bedc48a
prev998:1754a8c6a9cf
next1024:c67f2d61ab97
author nkeynes
date Tue Jun 02 23:16:26 2009 +0000 (12 years ago)
permissions -rw-r--r--
last change "MythTV" patch from Wahrhaft, thanks!:
* Add support for LIRC input devices
* Add hotkey input support
* Add command-line option for immediate fullscreen
file annotate diff log raw
1.1 --- a/src/main.c Tue Mar 24 11:15:57 2009 +0000
1.2 +++ b/src/main.c Tue Jun 02 23:16:26 2009 +0000
1.3 @@ -35,13 +35,15 @@
1.4 #include "maple/maple.h"
1.5 #include "sh4/sh4.h"
1.6 #include "aica/armdasm.h"
1.7 +#include "hotkeys.h"
1.8
1.9 -char *option_list = "a:A:c:dg:G:hHl:m:npt:T:uvV:x?";
1.10 +char *option_list = "a:A:c:dfg:G:hHl:m:npt:T:uvV:x?";
1.11 struct option longopts[] = {
1.12 { "aica", required_argument, NULL, 'a' },
1.13 { "audio", required_argument, NULL, 'A' },
1.14 { "config", required_argument, NULL, 'c' },
1.15 { "debugger", no_argument, NULL, 'D' },
1.16 + { "fullscreen", no_argument, NULL, 'f' },
1.17 { "gdb-sh4", required_argument, NULL, 'g' },
1.18 { "gdb-arm", required_argument, NULL, 'G' },
1.19 { "help", no_argument, NULL, 'h' },
1.20 @@ -65,6 +67,7 @@
1.21 gboolean headless = FALSE;
1.22 gboolean use_xlat = TRUE;
1.23 gboolean show_debugger = FALSE;
1.24 +gboolean show_fullscreen = FALSE;
1.25 extern uint32_t sh4_cpu_multiplier;
1.26
1.27 static void print_version()
1.28 @@ -82,6 +85,7 @@
1.29 printf( " -A, --audio=DRIVER %s\n", _("Use the specified audio driver (? to list)") );
1.30 printf( " -c, --config=CONFFILE %s\n", _("Load configuration from CONFFILE") );
1.31 printf( " -d, --debugger %s\n", _("Start in debugger mode") );
1.32 + printf( " -f, --fullscreen %s\n", _("Start in fullscreen mode") );
1.33 printf( " -g, --gdb-sh4=PORT %s\n", _("Start GDB remote server on PORT for SH4") );
1.34 printf( " -G, --gdb-arm=PORT %s\n", _("Start GDB remote server on PORT for ARM") );
1.35 printf( " -h, --help %s\n", _("Display this usage information") );
1.36 @@ -136,6 +140,9 @@
1.37 case 'd': /* Launch w/ debugger */
1.38 show_debugger = TRUE;
1.39 break;
1.40 + case 'f':
1.41 + show_fullscreen = TRUE;
1.42 + break;
1.43 case 'g':
1.44 sh4_gdb_port = optarg;
1.45 break;
1.46 @@ -216,7 +223,7 @@
1.47 if( headless ) {
1.48 display_set_driver( &display_null_driver );
1.49 } else {
1.50 - gui_init(show_debugger);
1.51 + gui_init(show_debugger, show_fullscreen);
1.52
1.53 display_driver_t display_driver = get_display_driver_by_name(display_driver_name);
1.54 if( display_driver == NULL ) {
1.55 @@ -228,6 +235,8 @@
1.56 exit(2);
1.57 }
1.58 }
1.59 +
1.60 + hotkeys_init();
1.61
1.62 maple_reattach_all();
1.63 INFO( "%s! ready...", APP_NAME );
.