28 |
|
#include "prefs.h" |
29 |
|
|
30 |
|
|
31 |
< |
// Common preferences items (those which exist on all platforms) |
32 |
< |
// Except for "disk", "floppy", "cdrom", "scsiX", "screen", "rom" and "ether", |
33 |
< |
// these are guaranteed to be in the prefs; "disk", "floppy" and "cdrom" can |
34 |
< |
// occur multiple times |
35 |
< |
prefs_desc common_prefs_items[] = { |
36 |
< |
{"disk", TYPE_STRING, true}, // Device/file names of Mac volumes (disk.cpp) |
37 |
< |
{"floppy", TYPE_STRING, true}, // Device/file names of Mac floppy drives (sony.cpp) |
38 |
< |
{"cdrom", TYPE_STRING, true}, // Device/file names of Mac CD-ROM drives (cdrom.cpp) |
39 |
< |
{"extfs", TYPE_STRING, false}, // Root path of ExtFS (extfs.cpp) |
40 |
< |
{"scsi0", TYPE_STRING, false}, // SCSI targets for Mac SCSI ID 0..6 (scsi_*.cpp) |
41 |
< |
{"scsi1", TYPE_STRING, false}, |
42 |
< |
{"scsi2", TYPE_STRING, false}, |
43 |
< |
{"scsi3", TYPE_STRING, false}, |
44 |
< |
{"scsi4", TYPE_STRING, false}, |
45 |
< |
{"scsi5", TYPE_STRING, false}, |
46 |
< |
{"scsi6", TYPE_STRING, false}, |
47 |
< |
{"screen", TYPE_STRING, false}, // Video mode (video.cpp) |
48 |
< |
{"seriala", TYPE_STRING, false}, // Device name of Mac serial port A (serial_*.cpp) |
49 |
< |
{"serialb", TYPE_STRING, false}, // Device name of Mac serial port B (serial_*.cpp) |
50 |
< |
{"ether", TYPE_STRING, false}, // Device name of Mac ethernet adapter (ether_*.cpp) |
51 |
< |
{"rom", TYPE_STRING, false}, // Path of ROM file (main_*.cpp) |
52 |
< |
{"bootdrive", TYPE_INT16, false}, // Boot drive number (main.cpp) |
53 |
< |
{"bootdriver", TYPE_INT16, false}, // Boot driver number (main.cpp) |
54 |
< |
{"ramsize", TYPE_INT32, false}, // Size of Mac RAM in bytes (main_*.cpp) |
55 |
< |
{"frameskip", TYPE_INT32, false}, // Number of frames to skip in refreshed video modes (video_*.cpp) |
56 |
< |
{"modelid", TYPE_INT32, false}, // Mac Model ID (Gestalt Model ID minus 6) (rom_patches.cpp) |
57 |
< |
{"cpu", TYPE_INT32, false}, // CPU type (0 = 68000, 1 = 68010 etc.) (main.cpp) |
58 |
< |
{"fpu", TYPE_BOOLEAN, false}, // Enable FPU emulation (main.cpp) |
59 |
< |
{"nocdrom", TYPE_BOOLEAN, false}, // Don't install CD-ROM driver (cdrom.cpp/rom_patches.cpp) |
60 |
< |
{"nosound", TYPE_BOOLEAN, false}, // Don't enable sound output (audio_*.cpp) |
61 |
< |
{"nogui", TYPE_BOOLEAN, false}, // Disable GUI (main_*.cpp) |
62 |
< |
{NULL, TYPE_END, false} // End of list |
63 |
< |
}; |
64 |
< |
|
65 |
< |
|
66 |
< |
// Prefs item are stored in a linked list of these nodes |
31 |
> |
// Prefs items are stored in a linked list of these nodes |
32 |
|
struct prefs_node { |
33 |
|
prefs_node *next; |
34 |
|
const char *name; |
50 |
|
the_prefs = NULL; |
51 |
|
|
52 |
|
// Set defaults |
53 |
< |
SysAddSerialPrefs(); |
89 |
< |
PrefsAddInt16("bootdriver", 0); |
90 |
< |
PrefsAddInt16("bootdrive", 0); |
91 |
< |
PrefsAddInt32("ramsize", 8 * 1024 * 1024); |
92 |
< |
PrefsAddInt32("frameskip", 6); |
93 |
< |
PrefsAddInt32("modelid", 5); // Mac IIci |
94 |
< |
PrefsAddInt32("cpu", 3); // 68030 |
95 |
< |
PrefsAddBool("fpu", false); |
96 |
< |
PrefsAddBool("nocdrom", false); |
97 |
< |
PrefsAddBool("nosound", false); |
98 |
< |
PrefsAddBool("nogui", false); |
53 |
> |
AddPrefsDefaults(); |
54 |
|
AddPlatformPrefsDefaults(); |
55 |
|
|
56 |
|
// Load preferences from settings file |
347 |
|
fprintf(f, "%s %d\n", list->name, PrefsFindInt16(list->name)); |
348 |
|
break; |
349 |
|
case TYPE_INT32: |
350 |
< |
fprintf(f, "%s %ld\n", list->name, PrefsFindInt32(list->name)); |
350 |
> |
fprintf(f, "%s %d\n", list->name, PrefsFindInt32(list->name)); |
351 |
|
break; |
352 |
|
default: |
353 |
|
break; |