cfgfile_write_str (f, _T("gfx_colour_mode"), colormode1[p->color_mode]);
cfgfile_write_bool(f, _T("gfx_blacker_than_black"), p->gfx_blackerthanblack);
cfgfile_dwrite_bool(f, _T("gfx_monochrome"), p->gfx_grayscale);
- cfgfile_write_str(f, _T("gfx_atari_palette_fix"), threebitcolors[p->gfx_threebitcolors]);
+ cfgfile_dwrite_str(f, _T("gfx_atari_palette_fix"), threebitcolors[p->gfx_threebitcolors]);
cfgfile_dwrite_bool (f, _T("gfx_black_frame_insertion"), p->lightboost_strobo);
cfgfile_write_str (f, _T("gfx_api"), filterapi[p->gfx_api]);
cfgfile_dwrite (f, _T("gfx_horizontal_tweak"), _T("%d"), p->gfx_extrawidth);
#include "sounddep/sound.h"
-void default_prefs (struct uae_prefs *p, int type)
+void default_prefs (struct uae_prefs *p, bool reset, int type)
{
int i;
int roms[] = { 6, 7, 8, 9, 10, 14, 5, 4, 3, 2, 1, -1 };
TCHAR zero = 0;
struct zfile *f;
- reset_inputdevice_config (p);
+ reset_inputdevice_config (p, reset);
memset (p, 0, sizeof (*p));
_tcscpy (p->description, _T("UAE default configuration"));
p->config_hardware_path[0] = 0;
p->jports[1].id = -1;
p->jports[2].id = -1;
p->jports[3].id = -1;
- inputdevice_joyport_config_store(p, _T("mouse"), 0, -1, 0);
- inputdevice_joyport_config_store(p, _T("kbd1"), 1, -1, 0);
+ if (reset) {
+ inputdevice_joyport_config_store(p, _T("mouse"), 0, -1, 0);
+ inputdevice_joyport_config_store(p, _T("kbd1"), 1, -1, 0);
+ }
p->keyboard_lang = KBD_LANG_US;
p->produce_sound = 3;
struct uaedev_config_info ci = { 0 };
int roms[] = { 15, 31, 16, 46, -1 };
- default_prefs (p, 0);
+ default_prefs (p, true, 0);
//p->headless = 1;
p->produce_sound = 0;
p->gfx_resolution = 0;
extern int inputdevice_get_mapping (int devnum, int num, uae_u64 *pflags, int *port, TCHAR *name, TCHAR *custom, int sub);
extern void inputdevice_copyconfig (struct uae_prefs *src, struct uae_prefs *dst);
extern void inputdevice_copy_single_config (struct uae_prefs *p, int src, int dst, int devnum, int selectedwidget);
+extern void inputdevice_copyjports(struct uae_prefs *srcprefs, struct uae_prefs *dstprefs);
extern void inputdevice_swap_ports (struct uae_prefs *p, int devnum);
extern void inputdevice_swap_compa_ports (struct uae_prefs *p, int portswap);
extern void inputdevice_config_change (void);
extern void write_inputdevice_config (struct uae_prefs *p, struct zfile *f);
extern void read_inputdevice_config (struct uae_prefs *p, const TCHAR *option, TCHAR *value);
-extern void reset_inputdevice_config (struct uae_prefs *pr);
+extern void reset_inputdevice_config (struct uae_prefs *pr, bool reset);
extern int inputdevice_joyport_config(struct uae_prefs *p, const TCHAR *value1, const TCHAR *value2, int portnum, int mode, int type, bool candefault);
extern void inputdevice_joyport_config_store(struct uae_prefs *p, const TCHAR *value, int portnum, int mode, int type);
extern int inputdevice_getjoyportdevice (int port, int val);
extern TCHAR *get_error_log (void);
extern bool is_error_log (void);
-extern void default_prefs (struct uae_prefs *, int);
+extern void default_prefs (struct uae_prefs *, bool, int);
extern void discard_prefs (struct uae_prefs *, int);
int parse_cmdline_option (struct uae_prefs *, TCHAR, const TCHAR*);
temp_uid.lastdevtype = -1;
}
-void reset_inputdevice_config (struct uae_prefs *prefs)
+void reset_inputdevice_config (struct uae_prefs *prefs, bool reset)
{
for (int i = 0; i < MAX_INPUT_SETTINGS; i++)
reset_inputdevice_slot (prefs, i);
reset_inputdevice_config_temp();
- for (int i = 0; i < MAX_JPORTS; i++) {
- struct jport_config *jp = &jport_config_store[i];
- memset(jp, 0, sizeof(struct jport_config));
+ if (reset) {
+ for (int i = 0; i < MAX_JPORTS; i++) {
+ struct jport_config *jp = &jport_config_store[i];
+ memset(jp, 0, sizeof(struct jport_config));
+ }
+ inputdevice_store_clear();
}
- inputdevice_store_clear();
}
static void set_kbr_default_event (struct uae_input_device *kbr, struct uae_input_device_kbr_default *trans, int num)
}
#endif
}
+#if 0
if (uaeboard_bank.baseaddr) {
uae_u8 tmp[16];
p[1] |= 4;
}
}
+#endif
}
+#if 0
void mousehack_write(int reg, uae_u16 val)
{
switch (reg)
break;
}
}
-
+#endif
#if 0
static void inputdevice_mh_abs_v36 (int x, int y)
}
}
-void inputdevice_updateconfig_internal (struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)
+void inputdevice_copyjports(struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)
{
- keyboard_default = keyboard_default_table[currprefs.input_keyboard_type];
-
for (int i = 0; i < MAX_JPORTS; i++) {
- copyjport (srcprefs, dstprefs, i);
+ copyjport(srcprefs, dstprefs, i);
}
if (srcprefs) {
for (int i = 0; i < MAX_JPORTS_CUSTOM; i++) {
}
}
+}
+
+void inputdevice_updateconfig_internal (struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)
+{
+ keyboard_default = keyboard_default_table[currprefs.input_keyboard_type];
+
+ inputdevice_copyjports(srcprefs, dstprefs);
resetinput ();
joysticks = dstprefs->joystick_settings[dstprefs->input_selected_setting];
#endif
set_config_changed ();
if (restart_config[0]) {
- default_prefs (&currprefs, 0);
+ default_prefs (&currprefs, true, 0);
fixup_prefs (&currprefs, true);
}