--- uae/src/include/options.h 2018/04/24 16:43:47 1.1.1.6 +++ uae/src/include/options.h 2018/04/24 16:45:14 1.1.1.7 @@ -9,7 +9,7 @@ #define UAEMAJOR 0 #define UAEMINOR 8 -#define UAESUBREV 6 +#define UAESUBREV 7 typedef enum { KBD_LANG_US, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; @@ -17,7 +17,16 @@ extern long int version; struct uaedev_mount_info; +struct strlist { + struct strlist *next; + char *str; +}; + struct uae_prefs { + struct strlist *unknown_lines; + + char description[256]; + int framerate; int illegal_mem; int no_xhair; @@ -25,8 +34,13 @@ struct uae_prefs { int serial_demand; int parallel_demand; int automount_uaedev; + int use_gfxlib; + + int start_debugger; + int start_gui; - int fake_joystick; + int jport0; + int jport1; KbdLang keyboard_lang; int allow_save; int emul_accuracy; @@ -38,6 +52,8 @@ struct uae_prefs { int sound_freq; int sound_minbsiz; int sound_maxbsiz; + int sound_pri_time; + int sound_pri_cutoff; int gfx_width; int gfx_height; @@ -50,15 +66,17 @@ struct uae_prefs { int gfx_ycenter; int color_mode; - /* X11 specific options */ - int use_low_bandwidth; - int use_mitshm; - int use_dgamode; - int blits_32bit_enabled; int immediate_blits; char df[4][256]; + char romfile[256]; + char keyfile[256]; + char prtname[256]; + + char path_floppy[256]; + char path_hardfile[256]; + char path_rom[256]; int m68k_speed; int cpu_level; @@ -71,10 +89,42 @@ struct uae_prefs { uae_u32 bogomem_size; uae_u32 a3000mem_size; uae_u32 gfxmem_size; - + struct uaedev_mount_info *mountinfo; + + /* Target specific options */ + int x11_use_low_bandwidth; + int x11_use_mitshm; + int x11_use_dgamode; + int x11_hide_cursor; + int svga_no_linear; }; +/* Contains the filename of .uaerc */ +extern char optionsfile[]; +extern void save_options (FILE *, struct uae_prefs *); + +extern void default_prefs (struct uae_prefs *); +extern void discard_prefs (struct uae_prefs *); + +extern int cfgfile_yesno (char *option, char *value, char *name, int *location); +extern int cfgfile_intval (char *option, char *value, char *name, int *location, int scale); +extern int cfgfile_strval (char *option, char *value, char *name, int *location, const char *table[], int more); +extern int cfgfile_string (char *option, char *value, char *name, char *location, int maxsz); +extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file); + +extern int target_parse_option (struct uae_prefs *, char *option, char *value); +extern void target_save_options (FILE *, struct uae_prefs *); + +extern int cfgfile_load (struct uae_prefs *, const char *filename); +extern int cfgfile_save (struct uae_prefs *, const char *filename); +struct mount_data; +extern void cfgfile_parse_line (struct uae_prefs *p, char *, struct mount_data **); +extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value, + struct mount_data **); +extern int cfgfile_get_description (const char *filename, char *description); +extern void cfgfile_show_usage (void); + extern void fixup_prefs_dimensions (struct uae_prefs *prefs); extern void check_prefs_changed_custom (void); @@ -82,8 +132,8 @@ extern void check_prefs_changed_cpu (voi extern void check_prefs_changed_audio (void); extern int check_prefs_changed_gfx (void); -#define JSEM_DECODEVAL(n,v) (((v) >> (n*8)) & 255) -/* Determine how port n is configured with the value v in fake_joystick */ +#define JSEM_DECODEVAL(n,v) ((n) == 0 ? (v)->jport0 : (v)->jport1) +/* Determine how port n is configured */ #define JSEM_ISJOY0(n,v) (JSEM_DECODEVAL(n,v) == 0) #define JSEM_ISJOY1(n,v) (JSEM_DECODEVAL(n,v) == 1) #define JSEM_ISMOUSE(n,v) (JSEM_DECODEVAL(n,v) == 2) @@ -91,10 +141,6 @@ extern int check_prefs_changed_gfx (void #define JSEM_ISCURSOR(n,v) (JSEM_DECODEVAL(n,v) == 4) #define JSEM_ISSOMEWHEREELSE(n,v) (JSEM_DECODEVAL(n,v) == 5) extern const char *gameport_state (int n); -extern int parse_joy_spec (char *spec); - -/* These preferences make sense only at startup. */ -extern int no_gui, use_debugger, use_gfxlib; extern struct uae_prefs currprefs, changed_prefs;