--- uae/src/main.c 2018/04/24 16:47:23 1.1.1.8 +++ uae/src/main.c 2018/04/24 16:54:45 1.1.1.11 @@ -48,6 +48,8 @@ int no_gui = 0; int joystickpresent = 0; int cloanto_rom = 0; +struct gui_info gui_data; + char warning_buffer[256]; char optionsfile[256]; @@ -116,6 +118,7 @@ void default_prefs (struct uae_prefs *p) p->sound_freq = DEFAULT_SOUND_FREQ; p->sound_minbsiz = DEFAULT_SOUND_MINB; p->sound_maxbsiz = DEFAULT_SOUND_MAXB; + p->sound_interpol = 0; p->gfx_framerate = 1; p->gfx_width = 800; @@ -135,6 +138,8 @@ void default_prefs (struct uae_prefs *p) p->svga_no_linear = 0; + p->curses_reverse_video = 0; + p->win32_middle_mouse = 0; p->win32_sound_style = 0; p->win32_sound_tweak = 0; @@ -158,7 +163,7 @@ void default_prefs (struct uae_prefs *p) strcpy (p->path_floppy, "./"); strcpy (p->path_hardfile, "./"); - p->m68k_speed = 4; + p->m68k_speed = 0; p->cpu_level = 2; p->cpu_compatible = 0; p->address_space_24 = 0; @@ -170,6 +175,8 @@ void default_prefs (struct uae_prefs *p) p->bogomem_size = 0x00000000; p->gfxmem_size = 0x00000000; + p->nr_floppies = 4; + p->mountinfo = alloc_mountinfo (); } @@ -269,6 +276,12 @@ static void fix_options (void) } #endif + if (currprefs.nr_floppies < 1 || currprefs.nr_floppies > 4) { + fprintf (stderr, "Invalid number of floppies. Using 4.\n"); + currprefs.nr_floppies = 4; + err = 1; + } + if (err) fprintf (stderr, "Please use \"uae -h\" to get usage information.\n"); } @@ -331,6 +344,15 @@ void parse_cmdline (int argc, char **arg } else if (strcmp (argv[i], "-h") == 0 || strcmp (argv[i], "-help") == 0) { usage (); exit (0); + } else { + if (argv[i][0] == '-' && argv[i][1] != '\0') { + const char *arg = argv[i] + 2; + int extra_arg = *arg == '\0'; + if (extra_arg) + arg = i + 1 < argc ? argv[i + 1] : 0; + if (parse_cmdline_option (argv[i][1], arg) && extra_arg) + i++; + } } } }