291 |
|
GtkWidget *notebook = gtk_notebook_new(); |
292 |
|
gtk_widget_show(notebook); |
293 |
|
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); |
294 |
< |
gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE); |
294 |
> |
gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), FALSE); |
295 |
|
gtk_box_pack_start(GTK_BOX(box), notebook, TRUE, TRUE, 0); |
296 |
|
|
297 |
|
create_volumes_pane(notebook); |
318 |
|
* "Volumes" pane |
319 |
|
*/ |
320 |
|
|
321 |
< |
static GtkWidget *volume_list; |
321 |
> |
static GtkWidget *volume_list, *w_extfs; |
322 |
|
static int selected_volume; |
323 |
|
|
324 |
|
// Volume in list selected |
420 |
|
gtk_clist_get_text(GTK_CLIST(volume_list), i, 0, &str); |
421 |
|
PrefsAddString("disk", str); |
422 |
|
} |
423 |
+ |
|
424 |
+ |
PrefsReplaceString("extfs", gtk_entry_get_text(GTK_ENTRY(w_extfs))); |
425 |
|
} |
426 |
|
|
427 |
|
// Create "Volumes" pane |
457 |
|
make_button_box(box, 0, buttons); |
458 |
|
make_separator(box); |
459 |
|
|
460 |
+ |
w_extfs = make_entry(box, STR_EXTFS_CTRL, "extfs"); |
461 |
+ |
|
462 |
|
static const opt_desc options[] = { |
463 |
|
{STR_BOOT_ANY_LAB, GTK_SIGNAL_FUNC(mn_boot_any)}, |
464 |
|
{STR_BOOT_CDROM_LAB, GTK_SIGNAL_FUNC(mn_boot_cdrom)}, |
525 |
|
static int display_type; |
526 |
|
static int dis_width, dis_height; |
527 |
|
|
528 |
+ |
#if ENABLE_FBDEV_DGA |
529 |
+ |
static GtkWidget *w_fbdev_name, *w_fbdevice_file; |
530 |
+ |
static GtkWidget *l_fbdev_name, *l_fbdevice_file; |
531 |
+ |
static char fbdev_name[256]; |
532 |
+ |
#endif |
533 |
+ |
|
534 |
|
// Hide/show graphics widgets |
535 |
|
static void hide_show_graphics_widgets(void) |
536 |
|
{ |
537 |
|
switch (display_type) { |
538 |
|
case DISPLAY_WINDOW: |
539 |
|
gtk_widget_show(w_frameskip); gtk_widget_show(l_frameskip); |
540 |
+ |
#if ENABLE_FBDEV_DGA |
541 |
+ |
gtk_widget_show(w_display_x); gtk_widget_show(l_display_x); |
542 |
+ |
gtk_widget_show(w_display_y); gtk_widget_show(l_display_y); |
543 |
+ |
gtk_widget_hide(w_fbdev_name); gtk_widget_hide(l_fbdev_name); |
544 |
+ |
#endif |
545 |
|
break; |
546 |
|
case DISPLAY_SCREEN: |
547 |
|
gtk_widget_hide(w_frameskip); gtk_widget_hide(l_frameskip); |
548 |
+ |
#if ENABLE_FBDEV_DGA |
549 |
+ |
gtk_widget_hide(w_display_x); gtk_widget_hide(l_display_x); |
550 |
+ |
gtk_widget_hide(w_display_y); gtk_widget_hide(l_display_y); |
551 |
+ |
gtk_widget_show(w_fbdev_name); gtk_widget_show(l_fbdev_name); |
552 |
+ |
#endif |
553 |
|
break; |
554 |
|
} |
555 |
|
} |
588 |
|
display_type = DISPLAY_WINDOW; |
589 |
|
dis_width = 512; |
590 |
|
dis_height = 384; |
591 |
+ |
#if ENABLE_FBDEV_DGA |
592 |
+ |
fbdev_name[0] = 0; |
593 |
+ |
#endif |
594 |
|
|
595 |
|
const char *str = PrefsFindString("screen"); |
596 |
|
if (str) { |
597 |
|
if (sscanf(str, "win/%d/%d", &dis_width, &dis_height) == 2) |
598 |
|
display_type = DISPLAY_WINDOW; |
599 |
+ |
#if ENABLE_FBDEV_DGA |
600 |
+ |
else if (sscanf(str, "dga/%255s", fbdev_name) == 1) |
601 |
+ |
#else |
602 |
|
else if (sscanf(str, "dga/%d/%d", &dis_width, &dis_height) == 2) |
603 |
+ |
#endif |
604 |
|
display_type = DISPLAY_SCREEN; |
605 |
|
} |
606 |
|
} |
622 |
|
sprintf(pref, "win/%d/%d", dis_width, dis_height); |
623 |
|
break; |
624 |
|
case DISPLAY_SCREEN: |
625 |
+ |
#if ENABLE_FBDEV_DGA |
626 |
+ |
str = gtk_entry_get_text(GTK_ENTRY(w_fbdev_name)); |
627 |
+ |
sprintf(pref, "dga/%s", str); |
628 |
+ |
#else |
629 |
|
sprintf(pref, "dga/%d/%d", dis_width, dis_height); |
630 |
+ |
#endif |
631 |
|
break; |
632 |
|
default: |
633 |
|
PrefsRemoveItem("screen"); |
645 |
|
parse_graphics_prefs(); |
646 |
|
|
647 |
|
box = make_pane(top, STR_GRAPHICS_SOUND_PANE_TITLE); |
648 |
< |
table = make_table(box, 2, 4); |
648 |
> |
table = make_table(box, 2, 5); |
649 |
|
|
650 |
|
label = gtk_label_new(GetString(STR_VIDEO_TYPE_CTRL)); |
651 |
|
gtk_widget_show(label); |
746 |
|
gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 3, 4, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4); |
747 |
|
w_display_y = GTK_COMBO(combo)->entry; |
748 |
|
|
749 |
+ |
#if ENABLE_FBDEV_DGA |
750 |
+ |
l_fbdev_name = gtk_label_new(GetString(STR_FBDEV_NAME_CTRL)); |
751 |
+ |
gtk_widget_show(l_fbdev_name); |
752 |
+ |
gtk_table_attach(GTK_TABLE(table), l_fbdev_name, 0, 1, 4, 5, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4); |
753 |
+ |
|
754 |
+ |
w_fbdev_name = gtk_entry_new(); |
755 |
+ |
gtk_widget_show(w_fbdev_name); |
756 |
+ |
gtk_entry_set_text(GTK_ENTRY(w_fbdev_name), fbdev_name); |
757 |
+ |
gtk_table_attach(GTK_TABLE(table), w_fbdev_name, 1, 2, 4, 5, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4); |
758 |
+ |
|
759 |
+ |
w_fbdevice_file = make_entry(box, STR_FBDEVICE_FILE_CTRL, "fbdevicefile"); |
760 |
+ |
#endif |
761 |
+ |
|
762 |
|
make_checkbox(box, STR_NOSOUND_CTRL, "nosound", GTK_SIGNAL_FUNC(tb_nosound)); |
763 |
|
|
764 |
|
hide_show_graphics_widgets(); |
933 |
|
static void mn_modelid_5(...) {PrefsReplaceInt32("modelid", 5);} |
934 |
|
static void mn_modelid_14(...) {PrefsReplaceInt32("modelid", 14);} |
935 |
|
|
936 |
+ |
// CPU/FPU type |
937 |
+ |
static void mn_cpu_68020(...) {PrefsReplaceInt32("cpu", 2); PrefsReplaceBool("fpu", false);} |
938 |
+ |
static void mn_cpu_68020_fpu(...) {PrefsReplaceInt32("cpu", 2); PrefsReplaceBool("fpu", true);} |
939 |
+ |
static void mn_cpu_68030(...) {PrefsReplaceInt32("cpu", 3); PrefsReplaceBool("fpu", false);} |
940 |
+ |
static void mn_cpu_68030_fpu(...) {PrefsReplaceInt32("cpu", 3); PrefsReplaceBool("fpu", true);} |
941 |
+ |
static void mn_cpu_68040(...) {PrefsReplaceInt32("cpu", 4); PrefsReplaceBool("fpu", true);} |
942 |
+ |
|
943 |
|
// "Use Raw Keycodes" button toggled |
944 |
|
static void tb_keycodes(GtkWidget *widget) |
945 |
|
{ |
1009 |
|
gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); |
1010 |
|
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
1011 |
|
|
1012 |
< |
static const opt_desc options[] = { |
1012 |
> |
static const opt_desc model_options[] = { |
1013 |
|
{STR_MODELID_5_LAB, GTK_SIGNAL_FUNC(mn_modelid_5)}, |
1014 |
|
{STR_MODELID_14_LAB, GTK_SIGNAL_FUNC(mn_modelid_14)}, |
1015 |
|
{0, NULL} |
1019 |
|
case 5: active = 0; break; |
1020 |
|
case 14: active = 1; break; |
1021 |
|
} |
1022 |
< |
menu = make_option_menu(box, STR_MODELID_CTRL, options, active); |
1022 |
> |
make_option_menu(box, STR_MODELID_CTRL, model_options, active); |
1023 |
> |
|
1024 |
> |
static const opt_desc cpu_options[] = { |
1025 |
> |
{STR_CPU_68020_LAB, GTK_SIGNAL_FUNC(mn_cpu_68020)}, |
1026 |
> |
{STR_CPU_68020_FPU_LAB, GTK_SIGNAL_FUNC(mn_cpu_68020_fpu)}, |
1027 |
> |
{STR_CPU_68030_LAB, GTK_SIGNAL_FUNC(mn_cpu_68030)}, |
1028 |
> |
{STR_CPU_68030_FPU_LAB, GTK_SIGNAL_FUNC(mn_cpu_68030_fpu)}, |
1029 |
> |
{STR_CPU_68040_LAB, GTK_SIGNAL_FUNC(mn_cpu_68040)}, |
1030 |
> |
{0, NULL} |
1031 |
> |
}; |
1032 |
> |
int cpu = PrefsFindInt32("cpu"); |
1033 |
> |
bool fpu = PrefsFindBool("fpu"); |
1034 |
> |
active = 0; |
1035 |
> |
switch (cpu) { |
1036 |
> |
case 2: active = fpu ? 1 : 0; break; |
1037 |
> |
case 3: active = fpu ? 3 : 2; break; |
1038 |
> |
case 4: active = 4; |
1039 |
> |
} |
1040 |
> |
make_option_menu(box, STR_CPU_CTRL, cpu_options, active); |
1041 |
|
|
1042 |
|
w_rom_file = make_entry(box, STR_ROM_FILE_CTRL, "rom"); |
1043 |
|
|