ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/prefs_editor_gtk.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/prefs_editor_gtk.cpp (file contents):
Revision 1.2 by cebix, 1999-10-03T19:43:28Z vs.
Revision 1.27 by gbeauche, 2005-06-06T20:11:50Z

# Line 1 | Line 1
1   /*
2   *  prefs_editor_gtk.cpp - Preferences editor, Unix implementation using GTK+
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 28 | Line 28
28   #include <net/if.h>
29   #include <net/if_arp.h>
30  
31 + #ifdef HAVE_GNOMEUI
32 + #include <gnome.h>
33 + #endif
34 +
35   #include "user_strings.h"
36   #include "version.h"
37   #include "cdrom.h"
# Line 45 | Line 49 | static bool start_clicked = true;      // Ret
49   static void create_volumes_pane(GtkWidget *top);
50   static void create_scsi_pane(GtkWidget *top);
51   static void create_graphics_pane(GtkWidget *top);
52 + static void create_input_pane(GtkWidget *top);
53   static void create_serial_pane(GtkWidget *top);
54   static void create_memory_pane(GtkWidget *top);
55 + static void create_jit_pane(GtkWidget *top);
56   static void read_settings(void);
57  
58  
# Line 59 | Line 65 | struct opt_desc {
65          GtkSignalFunc func;
66   };
67  
68 + struct combo_desc {
69 +        int label_id;
70 + };
71 +
72   static void add_menu_item(GtkWidget *menu, int label_id, GtkSignalFunc func)
73   {
74          GtkWidget *item = gtk_menu_item_new_with_label(GetString(label_id));
# Line 149 | Line 159 | static GtkWidget *make_option_menu(GtkWi
159          return menu;
160   }
161  
162 < static GtkWidget *make_entry(GtkWidget *top, int label_id, const char *prefs_item)
162 > static GtkWidget *make_file_entry(GtkWidget *top, int label_id, const char *prefs_item, bool only_dirs = false)
163   {
164          GtkWidget *box, *label, *entry;
165  
# Line 161 | Line 171 | static GtkWidget *make_entry(GtkWidget *
171          gtk_widget_show(label);
172          gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
173  
164        entry = gtk_entry_new();
165        gtk_widget_show(entry);
174          const char *str = PrefsFindString(prefs_item);
175          if (str == NULL)
176                  str = "";
177 +
178 + #ifdef HAVE_GNOMEUI
179 +        entry = gnome_file_entry_new(NULL, GetString(label_id));
180 +        if (only_dirs)
181 +                gnome_file_entry_set_directory(GNOME_FILE_ENTRY(entry), true);
182 +        gtk_entry_set_text(GTK_ENTRY(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(entry))), str);
183 + #else
184 +        entry = gtk_entry_new();
185          gtk_entry_set_text(GTK_ENTRY(entry), str);
186 + #endif
187 +        gtk_widget_show(entry);
188          gtk_box_pack_start(GTK_BOX(box), entry, TRUE, TRUE, 0);
189          return entry;
190   }
191  
192 + static char *get_file_entry_path(GtkWidget *entry)
193 + {
194 + #ifdef HAVE_GNOMEUI
195 +        return gnome_file_entry_get_full_path(GNOME_FILE_ENTRY(entry), false);
196 + #else
197 +        return gtk_entry_get_text(GTK_ENTRY(entry));
198 + #endif
199 + }
200 +
201   static GtkWidget *make_checkbox(GtkWidget *top, int label_id, const char *prefs_item, GtkSignalFunc func)
202   {
203          GtkWidget *button = gtk_check_button_new_with_label(GetString(label_id));
# Line 181 | Line 208 | static GtkWidget *make_checkbox(GtkWidge
208          return button;
209   }
210  
211 + static GtkWidget *make_combobox(GtkWidget *top, int label_id, const char *prefs_item, const combo_desc *options)
212 + {
213 +        GtkWidget *box, *label, *combo;
214 +        char str[32];
215 +
216 +        box = gtk_hbox_new(FALSE, 4);
217 +        gtk_widget_show(box);
218 +        gtk_box_pack_start(GTK_BOX(top), box, FALSE, FALSE, 0);
219 +
220 +        label = gtk_label_new(GetString(label_id));
221 +        gtk_widget_show(label);
222 +        gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
223  
224 +        GList *glist = NULL;
225 +        while (options->label_id) {
226 +                glist = g_list_append(glist, (void *)GetString(options->label_id));
227 +                options++;
228 +        }
229 +        
230 +        combo = gtk_combo_new();
231 +        gtk_widget_show(combo);
232 +        gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist);
233 +        
234 +        sprintf(str, "%d", PrefsFindInt32(prefs_item));
235 +        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str);
236 +        gtk_box_pack_start(GTK_BOX(box), combo, TRUE, TRUE, 0);
237 +        
238 +        return combo;
239 + }
240 +
241 +
242   /*
243   *  Show preferences editor
244   *  Returns true when user clicked on "Start", false otherwise
# Line 224 | Line 281 | static void dl_quit(GtkWidget *dialog)
281   // "About" selected
282   static void mn_about(...)
283   {
284 <        GtkWidget *dialog, *label, *button;
284 >        GtkWidget *dialog;
285 >
286 > #ifdef HAVE_GNOMEUI
287 >
288 >        char version[32];
289 >        sprintf(version, "Version %d.%d", VERSION_MAJOR, VERSION_MINOR);
290 >        const char *authors[] = {
291 >                "Christian Bauer",
292 >                "Orlando Bassotto",
293 >                "Gwenolé Beauchesne",
294 >                "Marc Chabanas",
295 >                "Marc Hellwig",
296 >                "Biill Huey",
297 >                "Brian J. Johnson",
298 >                "Jürgen Lachmann",
299 >                "Samuel Lander",
300 >                "David Lawrence",
301 >                "Lauri Pesonen",
302 >                "Bernd Schmidt",
303 >                "and others",
304 >                NULL
305 >        };
306 >        dialog = gnome_about_new(
307 >                "Basilisk II",
308 >                version,
309 >                "Copyright (C) 1997-2004 Christian Bauer",
310 >                authors,
311 >                "Basilisk II comes with ABSOLUTELY NO WARRANTY."
312 >                "This is free software, and you are welcome to redistribute it"
313 >                "under the terms of the GNU General Public License.",
314 >                NULL
315 >        );
316 >        gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(win));
317 >
318 > #else
319 >
320 >        GtkWidget *label, *button;
321  
322 <        char str[256];
323 <        sprintf(str, GetString(STR_ABOUT_TEXT1), VERSION_MAJOR, VERSION_MINOR);
324 <        strncat(str, "\n", 255);
325 <        strncat(str, GetString(STR_ABOUT_TEXT2), 255);
322 >        char str[512];
323 >        sprintf(str,
324 >                "Basilisk II\nVersion %d.%d\n\n"
325 >                "Copyright (C) 1997-2004 Christian Bauer et al.\n"
326 >                "E-mail: Christian.Bauer@uni-mainz.de\n"
327 >                "http://www.uni-mainz.de/~bauec002/B2Main.html\n\n"
328 >                "Basilisk II comes with ABSOLUTELY NO\n"
329 >                "WARRANTY. This is free software, and\n"
330 >                "you are welcome to redistribute it\n"
331 >                "under the terms of the GNU General\n"
332 >                "Public License.\n",
333 >                VERSION_MAJOR, VERSION_MINOR
334 >        );
335  
336          dialog = gtk_dialog_new();
235        gtk_widget_set_usize(GTK_WIDGET(dialog), strlen(GetString(STR_ABOUT_TEXT2)) + 200, 120);
337          gtk_window_set_title(GTK_WINDOW(dialog), GetString(STR_ABOUT_TITLE));
338          gtk_container_border_width(GTK_CONTAINER(dialog), 5);
339          gtk_widget_set_uposition(GTK_WIDGET(dialog), 100, 150);
# Line 247 | Line 348 | static void mn_about(...)
348          gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0);
349          GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
350          gtk_widget_grab_default(button);
351 +
352 + #endif
353 +
354          gtk_widget_show(dialog);
355   }
356  
# Line 258 | Line 362 | static void mn_zap_pram(...)
362  
363   // Menu item descriptions
364   static GtkItemFactoryEntry menu_items[] = {
365 <        {GetString(STR_PREFS_MENU_FILE_GTK),            NULL,                   NULL,                                                   0, "<Branch>"},
366 <        {GetString(STR_PREFS_ITEM_START_GTK),           NULL,                   GTK_SIGNAL_FUNC(cb_start),              0, NULL},
367 <        {GetString(STR_PREFS_ITEM_ZAP_PRAM_GTK),        NULL,                   GTK_SIGNAL_FUNC(mn_zap_pram),   0, NULL},
368 <        {GetString(STR_PREFS_ITEM_SEPL_GTK),            NULL,                   NULL,                                                   0, "<Separator>"},
369 <        {GetString(STR_PREFS_ITEM_QUIT_GTK),            "<control>Q",   GTK_SIGNAL_FUNC(cb_quit),               0, NULL},
370 <        {GetString(STR_HELP_MENU_GTK),                          NULL,                   NULL,                                                   0, "<LastBranch>"},
371 <        {GetString(STR_HELP_ITEM_ABOUT_GTK),            NULL,                   GTK_SIGNAL_FUNC(mn_about),              0, NULL}
365 >        {(gchar *)GetString(STR_PREFS_MENU_FILE_GTK),           NULL,                   NULL,                                                   0, "<Branch>"},
366 >        {(gchar *)GetString(STR_PREFS_ITEM_START_GTK),          NULL,                   GTK_SIGNAL_FUNC(cb_start),              0, NULL},
367 >        {(gchar *)GetString(STR_PREFS_ITEM_ZAP_PRAM_GTK),       NULL,                   GTK_SIGNAL_FUNC(mn_zap_pram),   0, NULL},
368 >        {(gchar *)GetString(STR_PREFS_ITEM_SEPL_GTK),           NULL,                   NULL,                                                   0, "<Separator>"},
369 >        {(gchar *)GetString(STR_PREFS_ITEM_QUIT_GTK),           "<control>Q",   GTK_SIGNAL_FUNC(cb_quit),               0, NULL},
370 >        {(gchar *)GetString(STR_HELP_MENU_GTK),                         NULL,                   NULL,                                                   0, "<LastBranch>"},
371 >        {(gchar *)GetString(STR_HELP_ITEM_ABOUT_GTK),           NULL,                   GTK_SIGNAL_FUNC(mn_about),              0, NULL}
372   };
373  
374   bool PrefsEditor(void)
# Line 291 | Line 395 | bool PrefsEditor(void)
395          GtkWidget *notebook = gtk_notebook_new();
396          gtk_widget_show(notebook);
397          gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
398 <        gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
398 >        gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), FALSE);
399          gtk_box_pack_start(GTK_BOX(box), notebook, TRUE, TRUE, 0);
400  
401          create_volumes_pane(notebook);
402          create_scsi_pane(notebook);
403          create_graphics_pane(notebook);
404 +        create_input_pane(notebook);
405          create_serial_pane(notebook);
406          create_memory_pane(notebook);
407 +        create_jit_pane(notebook);
408  
409          static const opt_desc buttons[] = {
410                  {STR_START_BUTTON, GTK_SIGNAL_FUNC(cb_start)},
# Line 318 | Line 424 | bool PrefsEditor(void)
424   *  "Volumes" pane
425   */
426  
427 < static GtkWidget *volume_list;
427 > static GtkWidget *volume_list, *w_extfs;
428   static int selected_volume;
429  
430   // Volume in list selected
# Line 400 | Line 506 | static void cb_remove_volume(...)
506   }
507  
508   // "Boot From" selected
509 < static void mn_boot_any(...) {PrefsReplaceInt16("bootdriver", 0);}
510 < static void mn_boot_cdrom(...) {PrefsReplaceInt16("bootdriver", CDROMRefNum);}
509 > static void mn_boot_any(...) {PrefsReplaceInt32("bootdriver", 0);}
510 > static void mn_boot_cdrom(...) {PrefsReplaceInt32("bootdriver", CDROMRefNum);}
511  
512   // "No CD-ROM Driver" button toggled
513   static void tb_nocdrom(GtkWidget *widget)
# Line 420 | Line 526 | static void read_volumes_settings(void)
526                  gtk_clist_get_text(GTK_CLIST(volume_list), i, 0, &str);
527                  PrefsAddString("disk", str);
528          }
529 +
530 +        PrefsReplaceString("extfs", get_file_entry_path(w_extfs));
531   }
532  
533   // Create "Volumes" pane
# Line 436 | Line 544 | static void create_volumes_pane(GtkWidge
544          gtk_widget_show(volume_list);
545          gtk_clist_set_selection_mode(GTK_CLIST(volume_list), GTK_SELECTION_SINGLE);
546          gtk_clist_set_shadow_type(GTK_CLIST(volume_list), GTK_SHADOW_NONE);
547 +        gtk_clist_set_reorderable(GTK_CLIST(volume_list), true);
548          gtk_signal_connect(GTK_OBJECT(volume_list), "select_row", GTK_SIGNAL_FUNC(cl_selected), NULL);
549          char *str;
550          int32 index = 0;
551 <        while ((str = (char *)PrefsFindString("disk", index++)) != NULL)
551 >        while ((str = const_cast<char *>(PrefsFindString("disk", index++))) != NULL)
552                  gtk_clist_append(GTK_CLIST(volume_list), &str);
553          gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll), volume_list);
554          gtk_box_pack_start(GTK_BOX(box), scroll, TRUE, TRUE, 0);
# Line 454 | Line 563 | static void create_volumes_pane(GtkWidge
563          make_button_box(box, 0, buttons);
564          make_separator(box);
565  
566 +        w_extfs = make_file_entry(box, STR_EXTFS_CTRL, "extfs", true);
567 +
568          static const opt_desc options[] = {
569                  {STR_BOOT_ANY_LAB, GTK_SIGNAL_FUNC(mn_boot_any)},
570                  {STR_BOOT_CDROM_LAB, GTK_SIGNAL_FUNC(mn_boot_cdrom)},
571                  {0, NULL}
572          };
573 <        int bootdriver = PrefsFindInt16("bootdriver"), active = 0;
573 >        int bootdriver = PrefsFindInt32("bootdriver"), active = 0;
574          switch (bootdriver) {
575                  case 0: active = 0; break;
576                  case CDROMRefNum: active = 1; break;
# Line 471 | Line 582 | static void create_volumes_pane(GtkWidge
582  
583  
584   /*
585 + *  "JIT Compiler" pane
586 + */
587 +
588 + static GtkWidget *w_jit_fpu;
589 + static GtkWidget *w_jit_atraps;
590 + static GtkWidget *w_jit_cache_size;
591 + static GtkWidget *w_jit_lazy_flush;
592 + static GtkWidget *w_jit_follow_const_jumps;
593 +
594 + // Set sensitivity of widgets
595 + static void set_jit_sensitive(void)
596 + {
597 +        const bool jit_enabled = PrefsFindBool("jit");
598 +        gtk_widget_set_sensitive(w_jit_fpu, jit_enabled);
599 +        gtk_widget_set_sensitive(w_jit_cache_size, jit_enabled);
600 +        gtk_widget_set_sensitive(w_jit_lazy_flush, jit_enabled);
601 +        gtk_widget_set_sensitive(w_jit_follow_const_jumps, jit_enabled);
602 + }
603 +
604 + // "Use JIT Compiler" button toggled
605 + static void tb_jit(GtkWidget *widget)
606 + {
607 +        PrefsReplaceBool("jit", GTK_TOGGLE_BUTTON(widget)->active);
608 +        set_jit_sensitive();
609 + }
610 +
611 + // "Compile FPU Instructions" button toggled
612 + static void tb_jit_fpu(GtkWidget *widget)
613 + {
614 +        PrefsReplaceBool("jitfpu", GTK_TOGGLE_BUTTON(widget)->active);
615 + }
616 +
617 + // "Lazy translation cache invalidation" button toggled
618 + static void tb_jit_lazy_flush(GtkWidget *widget)
619 + {
620 +        PrefsReplaceBool("jitlazyflush", GTK_TOGGLE_BUTTON(widget)->active);
621 + }
622 +
623 + // "Translate through constant jumps (inline blocks)" button toggled
624 + static void tb_jit_follow_const_jumps(GtkWidget *widget)
625 + {
626 +        PrefsReplaceBool("jitinline", GTK_TOGGLE_BUTTON(widget)->active);
627 + }
628 +
629 + // Read settings from widgets and set preferences
630 + static void read_jit_settings(void)
631 + {
632 + #if USE_JIT
633 +        bool jit_enabled = PrefsFindBool("jit");
634 +        if (jit_enabled) {
635 +                const char *str = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(w_jit_cache_size)->entry));
636 +                PrefsReplaceInt32("jitcachesize", atoi(str));
637 +        }
638 + #endif
639 + }
640 +
641 + // Create "JIT Compiler" pane
642 + static void create_jit_pane(GtkWidget *top)
643 + {
644 + #if USE_JIT
645 +        GtkWidget *box, *table, *label, *menu;
646 +        char str[32];
647 +        
648 +        box = make_pane(top, STR_JIT_PANE_TITLE);
649 +        make_checkbox(box, STR_JIT_CTRL, "jit", GTK_SIGNAL_FUNC(tb_jit));
650 +        
651 +        w_jit_fpu = make_checkbox(box, STR_JIT_FPU_CTRL, "jitfpu", GTK_SIGNAL_FUNC(tb_jit_fpu));
652 +        
653 +        // Translation cache size
654 +        static const combo_desc options[] = {
655 +                STR_JIT_CACHE_SIZE_2MB_LAB,
656 +                STR_JIT_CACHE_SIZE_4MB_LAB,
657 +                STR_JIT_CACHE_SIZE_8MB_LAB,
658 +                STR_JIT_CACHE_SIZE_16MB_LAB,
659 +                0
660 +        };
661 +        w_jit_cache_size = make_combobox(box, STR_JIT_CACHE_SIZE_CTRL, "jitcachesize", options);
662 +        
663 +        // Lazy translation cache invalidation
664 +        w_jit_lazy_flush = make_checkbox(box, STR_JIT_LAZY_CINV_CTRL, "jitlazyflush", GTK_SIGNAL_FUNC(tb_jit_lazy_flush));
665 +
666 +        // Follow constant jumps (inline basic blocks)
667 +        w_jit_follow_const_jumps = make_checkbox(box, STR_JIT_FOLLOW_CONST_JUMPS, "jitinline", GTK_SIGNAL_FUNC(tb_jit_follow_const_jumps));
668 +
669 +        set_jit_sensitive();
670 + #endif
671 + }
672 +
673 + /*
674   *  "SCSI" pane
675   */
676  
# Line 482 | Line 682 | static void read_scsi_settings(void)
682          for (int id=0; id<7; id++) {
683                  char prefs_name[32];
684                  sprintf(prefs_name, "scsi%d", id);
685 <                const char *str = gtk_entry_get_text(GTK_ENTRY(w_scsi[id]));
685 >                const char *str = get_file_entry_path(w_scsi[id]);
686                  if (str && strlen(str))
687                          PrefsReplaceString(prefs_name, str);
688                  else
# Line 500 | Line 700 | static void create_scsi_pane(GtkWidget *
700          for (int id=0; id<7; id++) {
701                  char prefs_name[32];
702                  sprintf(prefs_name, "scsi%d", id);
703 <                w_scsi[id] = make_entry(box, STR_SCSI_ID_0 + id, prefs_name);
703 >                w_scsi[id] = make_file_entry(box, STR_SCSI_ID_0 + id, prefs_name);
704          }
705   }
706  
# Line 520 | Line 720 | static GtkWidget *l_frameskip, *l_displa
720   static int display_type;
721   static int dis_width, dis_height;
722  
723 + #ifdef ENABLE_FBDEV_DGA
724 + static GtkWidget *w_fbdev_name, *w_fbdevice_file;
725 + static GtkWidget *l_fbdev_name, *l_fbdevice_file;
726 + static char fbdev_name[256];
727 + #endif
728 +
729 + static GtkWidget *w_dspdevice_file, *w_mixerdevice_file;
730 +
731   // Hide/show graphics widgets
732   static void hide_show_graphics_widgets(void)
733   {
734          switch (display_type) {
735                  case DISPLAY_WINDOW:
736                          gtk_widget_show(w_frameskip); gtk_widget_show(l_frameskip);
737 + #ifdef ENABLE_FBDEV_DGA
738 +                        gtk_widget_show(w_display_x); gtk_widget_show(l_display_x);
739 +                        gtk_widget_show(w_display_y); gtk_widget_show(l_display_y);
740 +                        gtk_widget_hide(w_fbdev_name); gtk_widget_hide(l_fbdev_name);
741 + #endif
742                          break;
743                  case DISPLAY_SCREEN:
744                          gtk_widget_hide(w_frameskip); gtk_widget_hide(l_frameskip);
745 + #ifdef ENABLE_FBDEV_DGA
746 +                        gtk_widget_hide(w_display_x); gtk_widget_hide(l_display_x);
747 +                        gtk_widget_hide(w_display_y); gtk_widget_hide(l_display_y);
748 +                        gtk_widget_show(w_fbdev_name); gtk_widget_show(l_fbdev_name);
749 + #endif
750                          break;
751          }
752   }
# Line 554 | Line 772 | static void mn_10hz(...) {PrefsReplaceIn
772   static void mn_15hz(...) {PrefsReplaceInt32("frameskip", 4);}
773   static void mn_30hz(...) {PrefsReplaceInt32("frameskip", 2);}
774   static void mn_60hz(...) {PrefsReplaceInt32("frameskip", 1);}
775 + static void mn_dynamic(...) {PrefsReplaceInt32("frameskip", 0);}
776 +
777 + // Set sensitivity of widgets
778 + static void set_graphics_sensitive(void)
779 + {
780 +        const bool sound_enabled = !PrefsFindBool("nosound");
781 +        gtk_widget_set_sensitive(w_dspdevice_file, sound_enabled);
782 +        gtk_widget_set_sensitive(w_mixerdevice_file, sound_enabled);
783 + }
784  
785   // "Disable Sound Output" button toggled
786   static void tb_nosound(GtkWidget *widget)
787   {
788          PrefsReplaceBool("nosound", GTK_TOGGLE_BUTTON(widget)->active);
789 +        set_graphics_sensitive();
790   }
791  
792   // Read graphics preferences
# Line 567 | Line 795 | static void parse_graphics_prefs(void)
795          display_type = DISPLAY_WINDOW;
796          dis_width = 512;
797          dis_height = 384;
798 + #ifdef ENABLE_FBDEV_DGA
799 +        fbdev_name[0] = 0;
800 + #endif
801  
802          const char *str = PrefsFindString("screen");
803          if (str) {
804                  if (sscanf(str, "win/%d/%d", &dis_width, &dis_height) == 2)
805                          display_type = DISPLAY_WINDOW;
806 + #ifdef ENABLE_FBDEV_DGA
807 +                else if (sscanf(str, "dga/%255s", fbdev_name) == 1)
808 + #else
809                  else if (sscanf(str, "dga/%d/%d", &dis_width, &dis_height) == 2)
810 + #endif
811                          display_type = DISPLAY_SCREEN;
812          }
813   }
# Line 594 | Line 829 | static void read_graphics_settings(void)
829                          sprintf(pref, "win/%d/%d", dis_width, dis_height);
830                          break;
831                  case DISPLAY_SCREEN:
832 + #ifdef ENABLE_FBDEV_DGA
833 +                        str = gtk_entry_get_text(GTK_ENTRY(w_fbdev_name));
834 +                        sprintf(pref, "dga/%s", str);
835 + #else
836                          sprintf(pref, "dga/%d/%d", dis_width, dis_height);
837 + #endif
838                          break;
839                  default:
840                          PrefsRemoveItem("screen");
841                          return;
842          }
843          PrefsReplaceString("screen", pref);
844 +
845 + #ifdef ENABLE_FBDEV_DGA
846 +        str = get_file_entry_path(w_fbdevice_file);
847 +        if (str && strlen(str))
848 +                PrefsReplaceString("fbdevicefile", str);
849 +        else
850 +                PrefsRemoveItem("fbdevicefile");
851 + #endif
852 +        PrefsReplaceString("dsp", get_file_entry_path(w_dspdevice_file));
853 +        PrefsReplaceString("mixer", get_file_entry_path(w_mixerdevice_file));
854   }
855  
856   // Create "Graphics/Sound" pane
# Line 612 | Line 862 | static void create_graphics_pane(GtkWidg
862          parse_graphics_prefs();
863  
864          box = make_pane(top, STR_GRAPHICS_SOUND_PANE_TITLE);
865 <        table = make_table(box, 2, 4);
865 >        table = make_table(box, 2, 5);
866  
867          label = gtk_label_new(GetString(STR_VIDEO_TYPE_CTRL));
868          gtk_widget_show(label);
# Line 647 | Line 897 | static void create_graphics_pane(GtkWidg
897          add_menu_item(menu, STR_REF_15HZ_LAB, GTK_SIGNAL_FUNC(mn_15hz));
898          add_menu_item(menu, STR_REF_30HZ_LAB, GTK_SIGNAL_FUNC(mn_30hz));
899          add_menu_item(menu, STR_REF_60HZ_LAB, GTK_SIGNAL_FUNC(mn_60hz));
900 +        add_menu_item(menu, STR_REF_DYNAMIC_LAB, GTK_SIGNAL_FUNC(mn_dynamic));
901          int frameskip = PrefsFindInt32("frameskip");
902 +        int item = -1;
903          switch (frameskip) {
904 <                case 12:
905 <                        gtk_menu_set_active(GTK_MENU(menu), 0);
906 <                        break;
907 <                case 8:
908 <                        gtk_menu_set_active(GTK_MENU(menu), 1);
909 <                        break;
910 <                case 6:
659 <                        gtk_menu_set_active(GTK_MENU(menu), 2);
660 <                        break;
661 <                case 4:
662 <                        gtk_menu_set_active(GTK_MENU(menu), 3);
663 <                        break;
664 <                case 2:
665 <                        gtk_menu_set_active(GTK_MENU(menu), 4);
666 <                        break;
667 <                case 1:
668 <                        gtk_menu_set_active(GTK_MENU(menu), 5);
669 <                        break;
904 >                case 12: item = 0; break;
905 >                case 8: item = 1; break;
906 >                case 6: item = 2; break;
907 >                case 4: item = 3; break;
908 >                case 2: item = 4; break;
909 >                case 1: item = 5; break;
910 >                case 0: item = 6; break;
911          }
912 +        if (item >= 0)
913 +                gtk_menu_set_active(GTK_MENU(menu), item);
914          gtk_option_menu_set_menu(GTK_OPTION_MENU(w_frameskip), menu);
915          gtk_table_attach(GTK_TABLE(table), w_frameskip, 1, 2, 1, 2, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4);
916  
# Line 678 | Line 921 | static void create_graphics_pane(GtkWidg
921          combo = gtk_combo_new();
922          gtk_widget_show(combo);
923          GList *glist1 = NULL;
924 <        glist1 = g_list_append(glist1, (char *)"512");
925 <        glist1 = g_list_append(glist1, (char *)"640");
926 <        glist1 = g_list_append(glist1, (char *)"800");
927 <        glist1 = g_list_append(glist1, (char *)"1024");
928 <        glist1 = g_list_append(glist1, (char *)"MAX");
924 >        glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_512_LAB));
925 >        glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_640_LAB));
926 >        glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_800_LAB));
927 >        glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_1024_LAB));
928 >        glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_MAX_LAB));
929          gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist1);
930          if (dis_width)
931                  sprintf(str, "%d", dis_width);
932          else
933 <                strcpy(str, "MAX");
933 >                strcpy(str, GetString(STR_SIZE_MAX_LAB));
934          gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str);
935          gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 2, 3, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4);
936          w_display_x = GTK_COMBO(combo)->entry;
# Line 699 | Line 942 | static void create_graphics_pane(GtkWidg
942          combo = gtk_combo_new();
943          gtk_widget_show(combo);
944          GList *glist2 = NULL;
945 <        glist2 = g_list_append(glist2, (char *)"384");
946 <        glist2 = g_list_append(glist2, (char *)"480");
947 <        glist2 = g_list_append(glist2, (char *)"600");
948 <        glist2 = g_list_append(glist2, (char *)"768");
949 <        glist2 = g_list_append(glist2, (char *)"MAX");
945 >        glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_384_LAB));
946 >        glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_480_LAB));
947 >        glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_600_LAB));
948 >        glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_768_LAB));
949 >        glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_MAX_LAB));
950          gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist2);
951          if (dis_height)
952                  sprintf(str, "%d", dis_height);
953          else
954 <                strcpy(str, "MAX");
954 >                strcpy(str, GetString(STR_SIZE_MAX_LAB));
955          gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str);
956          gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 3, 4, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4);
957          w_display_y = GTK_COMBO(combo)->entry;
958  
959 + #ifdef ENABLE_FBDEV_DGA
960 +        l_fbdev_name = gtk_label_new(GetString(STR_FBDEV_NAME_CTRL));
961 +        gtk_widget_show(l_fbdev_name);
962 +        gtk_table_attach(GTK_TABLE(table), l_fbdev_name, 0, 1, 4, 5, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
963 +
964 +        w_fbdev_name = gtk_entry_new();
965 +        gtk_widget_show(w_fbdev_name);
966 +        gtk_entry_set_text(GTK_ENTRY(w_fbdev_name), fbdev_name);
967 +        gtk_table_attach(GTK_TABLE(table), w_fbdev_name, 1, 2, 4, 5, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
968 +
969 +        w_fbdevice_file = make_file_entry(box, STR_FBDEVICE_FILE_CTRL, "fbdevicefile");
970 + #endif
971 +
972 +        make_separator(box);
973          make_checkbox(box, STR_NOSOUND_CTRL, "nosound", GTK_SIGNAL_FUNC(tb_nosound));
974 +        w_dspdevice_file = make_file_entry(box, STR_DSPDEVICE_FILE_CTRL, "dsp");
975 +        w_mixerdevice_file = make_file_entry(box, STR_MIXERDEVICE_FILE_CTRL, "mixer");
976 +
977 +        set_graphics_sensitive();
978  
979          hide_show_graphics_widgets();
980   }
981  
982  
983   /*
984 + *  "Input" pane
985 + */
986 +
987 + static GtkWidget *w_keycode_file;
988 + static GtkWidget *w_mouse_wheel_lines;
989 +
990 + // Set sensitivity of widgets
991 + static void set_input_sensitive(void)
992 + {
993 +        gtk_widget_set_sensitive(w_keycode_file, PrefsFindBool("keycodes"));
994 +        gtk_widget_set_sensitive(w_mouse_wheel_lines, PrefsFindInt32("mousewheelmode") == 1);
995 + }
996 +
997 + // "Use Raw Keycodes" button toggled
998 + static void tb_keycodes(GtkWidget *widget)
999 + {
1000 +        PrefsReplaceBool("keycodes", GTK_TOGGLE_BUTTON(widget)->active);
1001 +        set_input_sensitive();
1002 + }
1003 +
1004 + // "Mouse Wheel Mode" selected
1005 + static void mn_wheel_page(...) {PrefsReplaceInt32("mousewheelmode", 0); set_input_sensitive();}
1006 + static void mn_wheel_cursor(...) {PrefsReplaceInt32("mousewheelmode", 1); set_input_sensitive();}
1007 +
1008 + // Read settings from widgets and set preferences
1009 + static void read_input_settings(void)
1010 + {
1011 +        const char *str = get_file_entry_path(w_keycode_file);
1012 +        if (str && strlen(str))
1013 +                PrefsReplaceString("keycodefile", str);
1014 +        else
1015 +                PrefsRemoveItem("keycodefile");
1016 +
1017 +        PrefsReplaceInt32("mousewheellines", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w_mouse_wheel_lines)));
1018 + }
1019 +
1020 + // Create "Input" pane
1021 + static void create_input_pane(GtkWidget *top)
1022 + {
1023 +        GtkWidget *box, *hbox, *menu, *label;
1024 +        GtkObject *adj;
1025 +
1026 +        box = make_pane(top, STR_INPUT_PANE_TITLE);
1027 +
1028 +        make_checkbox(box, STR_KEYCODES_CTRL, "keycodes", GTK_SIGNAL_FUNC(tb_keycodes));
1029 +        w_keycode_file = make_file_entry(box, STR_KEYCODE_FILE_CTRL, "keycodefile");
1030 +
1031 +        make_separator(box);
1032 +
1033 +        static const opt_desc options[] = {
1034 +                {STR_MOUSEWHEELMODE_PAGE_LAB, GTK_SIGNAL_FUNC(mn_wheel_page)},
1035 +                {STR_MOUSEWHEELMODE_CURSOR_LAB, GTK_SIGNAL_FUNC(mn_wheel_cursor)},
1036 +                {0, NULL}
1037 +        };
1038 +        int wheelmode = PrefsFindInt32("mousewheelmode"), active = 0;
1039 +        switch (wheelmode) {
1040 +                case 0: active = 0; break;
1041 +                case 1: active = 1; break;
1042 +        }
1043 +        menu = make_option_menu(box, STR_MOUSEWHEELMODE_CTRL, options, active);
1044 +
1045 +        hbox = gtk_hbox_new(FALSE, 4);
1046 +        gtk_widget_show(hbox);
1047 +        gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
1048 +
1049 +        label = gtk_label_new(GetString(STR_MOUSEWHEELLINES_CTRL));
1050 +        gtk_widget_show(label);
1051 +        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
1052 +
1053 +        adj = gtk_adjustment_new(PrefsFindInt32("mousewheellines"), 1, 1000, 1, 5, 0);
1054 +        w_mouse_wheel_lines = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0.0, 0);
1055 +        gtk_widget_show(w_mouse_wheel_lines);
1056 +        gtk_box_pack_start(GTK_BOX(hbox), w_mouse_wheel_lines, FALSE, FALSE, 0);
1057 +
1058 +        set_input_sensitive();
1059 + }
1060 +
1061 +
1062 + /*
1063   *  "Serial/Network" pane
1064   */
1065  
1066 < static GtkWidget *w_seriala, *w_serialb, *w_ether;
1066 > static GtkWidget *w_seriala, *w_serialb, *w_ether, *w_udp_port;
1067 >
1068 > // Set sensitivity of widgets
1069 > static void set_serial_sensitive(void)
1070 > {
1071 > #if SUPPORTS_UDP_TUNNEL
1072 >        gtk_widget_set_sensitive(w_ether, !PrefsFindBool("udptunnel"));
1073 >        gtk_widget_set_sensitive(w_udp_port, PrefsFindBool("udptunnel"));
1074 > #endif
1075 > }
1076 >
1077 > // "Tunnel AppleTalk over IP" button toggled
1078 > static void tb_udptunnel(GtkWidget *widget)
1079 > {
1080 >        PrefsReplaceBool("udptunnel", GTK_TOGGLE_BUTTON(widget)->active);
1081 >        set_serial_sensitive();
1082 > }
1083  
1084   // Read settings from widgets and set preferences
1085   static void read_serial_settings(void)
# Line 741 | Line 1097 | static void read_serial_settings(void)
1097                  PrefsReplaceString("ether", str);
1098          else
1099                  PrefsRemoveItem("ether");
1100 +
1101 + #if SUPPORTS_UDP_TUNNEL
1102 +        PrefsReplaceInt32("udpport", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w_udp_port)));
1103 + #endif
1104   }
1105  
1106   // Add names of serial devices
# Line 762 | Line 1122 | static GList *add_serial_names(void)
1122                          if (strncmp(de->d_name, "ttyS", 4) == 0 || strncmp(de->d_name, "lp", 2) == 0) {
1123   #elif defined(__FreeBSD__)
1124                          if (strncmp(de->d_name, "cuaa", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) {
1125 + #elif defined(__NetBSD__)
1126 +                        if (strncmp(de->d_name, "tty0", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) {
1127   #elif defined(sgi)
1128                          if (strncmp(de->d_name, "ttyf", 4) == 0 || strncmp(de->d_name, "plp", 3) == 0) {
1129   #else
# Line 777 | Line 1139 | static GList *add_serial_names(void)
1139          if (glist)
1140                  g_list_sort(glist, gl_str_cmp);
1141          else
1142 <                glist = g_list_append(glist, (char *)"<none>");
1142 >                glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB));
1143          return glist;
1144   }
1145  
# Line 797 | Line 1159 | static GList *add_ether_names(void)
1159                          struct ifreq req, *ifr = ifc.ifc_req;
1160                          for (int i=0; i<ifc.ifc_len; i+=sizeof(ifreq), ifr++) {
1161                                  req = *ifr;
1162 < #if defined(__FreeBSD__) || defined(sgi)
1162 > #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(sgi)
1163                                  if (ioctl(s, SIOCGIFADDR, &req) == 0 && (req.ifr_addr.sa_family == ARPHRD_ETHER || req.ifr_addr.sa_family == ARPHRD_ETHER+1)) {
1164 < #else
1164 > #elif defined(__linux__)
1165                                  if (ioctl(s, SIOCGIFHWADDR, &req) == 0 && req.ifr_hwaddr.sa_family == ARPHRD_ETHER) {
1166 + #else
1167 +                                if (false) {
1168   #endif
1169                                          char *str = new char[64];
1170                                          strncpy(str, ifr->ifr_name, 63);
# Line 810 | Line 1174 | static GList *add_ether_names(void)
1174                  }
1175                  close(s);
1176          }
1177 + #ifdef HAVE_SLIRP
1178 +        static char s_slirp[] = "slirp";
1179 +        glist = g_list_append(glist, s_slirp);
1180 + #endif
1181          if (glist)
1182                  g_list_sort(glist, gl_str_cmp);
1183          else
1184 <                glist = g_list_append(glist, (char *)"<none>");
1184 >                glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB));
1185          return glist;
1186   }
1187  
1188   // Create "Serial/Network" pane
1189   static void create_serial_pane(GtkWidget *top)
1190   {
1191 <        GtkWidget *box, *table, *label, *combo;
1192 <        GList *glist = add_serial_names();
1191 >        GtkWidget *box, *hbox, *table, *label, *combo, *sep;
1192 >        GtkObject *adj;
1193  
1194          box = make_pane(top, STR_SERIAL_NETWORK_PANE_TITLE);
1195 <        table = make_table(box, 2, 3);
1195 >        table = make_table(box, 2, 4);
1196  
1197          label = gtk_label_new(GetString(STR_SERIALA_CTRL));
1198          gtk_widget_show(label);
1199          gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
1200  
1201 +        GList *glist = add_serial_names();
1202          combo = gtk_combo_new();
1203          gtk_widget_show(combo);
1204          gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist);
# Line 854 | Line 1223 | static void create_serial_pane(GtkWidget
1223          gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)0, 4, 4);
1224          w_serialb = GTK_COMBO(combo)->entry;
1225  
1226 +        sep = gtk_hseparator_new();
1227 +        gtk_widget_show(sep);
1228 +        gtk_table_attach(GTK_TABLE(table), sep, 0, 2, 2, 3, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
1229 +
1230          label = gtk_label_new(GetString(STR_ETHERNET_IF_CTRL));
1231          gtk_widget_show(label);
1232 <        gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
1232 >        gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, (GtkAttachOptions)0, (GtkAttachOptions)0, 4, 4);
1233  
1234          glist = add_ether_names();
1235          combo = gtk_combo_new();
# Line 866 | Line 1239 | static void create_serial_pane(GtkWidget
1239          if (str == NULL)
1240                  str = "";
1241          gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str);
1242 <        gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 2, 3, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)0, 4, 4);
1242 >        gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 3, 4, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)0, 4, 4);
1243          w_ether = GTK_COMBO(combo)->entry;
1244 +
1245 + #if SUPPORTS_UDP_TUNNEL
1246 +        make_checkbox(box, STR_UDPTUNNEL_CTRL, "udptunnel", GTK_SIGNAL_FUNC(tb_udptunnel));
1247 +
1248 +        hbox = gtk_hbox_new(FALSE, 4);
1249 +        gtk_widget_show(hbox);
1250 +        gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
1251 +
1252 +        label = gtk_label_new(GetString(STR_UDPPORT_CTRL));
1253 +        gtk_widget_show(label);
1254 +        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
1255 +
1256 +        adj = gtk_adjustment_new(PrefsFindInt32("udpport"), 1, 65535, 1, 5, 0);
1257 +        w_udp_port = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0.0, 0);
1258 +        gtk_widget_show(w_udp_port);
1259 +        gtk_box_pack_start(GTK_BOX(hbox), w_udp_port, FALSE, FALSE, 0);
1260 + #endif
1261 +
1262 +        set_serial_sensitive();
1263   }
1264  
1265  
# Line 877 | Line 1269 | static void create_serial_pane(GtkWidget
1269  
1270   static GtkObject *w_ramsize_adj;
1271   static GtkWidget *w_rom_file;
1272 < static GtkWidget *w_keycode_file;
1272 >
1273 > // "Ignore SEGV" button toggled
1274 > #ifdef HAVE_SIGSEGV_SKIP_INSTRUCTION
1275 > static void tb_ignoresegv(GtkWidget *widget)
1276 > {
1277 >        PrefsReplaceBool("ignoresegv", GTK_TOGGLE_BUTTON(widget)->active);
1278 > }
1279 > #endif
1280  
1281   // Model ID selected
1282   static void mn_modelid_5(...) {PrefsReplaceInt32("modelid", 5);}
1283   static void mn_modelid_14(...) {PrefsReplaceInt32("modelid", 14);}
1284  
1285 < // "Use Raw Keycodes" button toggled
1286 < static void tb_keycodes(GtkWidget *widget)
1287 < {
1288 <        PrefsReplaceBool("keycodes", GTK_TOGGLE_BUTTON(widget)->active);
1289 < }
1285 > // CPU/FPU type
1286 > static void mn_cpu_68020(...) {PrefsReplaceInt32("cpu", 2); PrefsReplaceBool("fpu", false);}
1287 > static void mn_cpu_68020_fpu(...) {PrefsReplaceInt32("cpu", 2); PrefsReplaceBool("fpu", true);}
1288 > static void mn_cpu_68030(...) {PrefsReplaceInt32("cpu", 3); PrefsReplaceBool("fpu", false);}
1289 > static void mn_cpu_68030_fpu(...) {PrefsReplaceInt32("cpu", 3); PrefsReplaceBool("fpu", true);}
1290 > static void mn_cpu_68040(...) {PrefsReplaceInt32("cpu", 4); PrefsReplaceBool("fpu", true);}
1291  
1292   // Read settings from widgets and set preferences
1293   static void read_memory_settings(void)
1294   {
1295          PrefsReplaceInt32("ramsize", int(GTK_ADJUSTMENT(w_ramsize_adj)->value) << 20);
1296  
1297 <        const char *str = gtk_entry_get_text(GTK_ENTRY(w_rom_file));
1297 >        const char *str = get_file_entry_path(w_rom_file);
1298          if (str && strlen(str))
1299                  PrefsReplaceString("rom", str);
1300          else
1301                  PrefsRemoveItem("rom");
1302  
903        str = gtk_entry_get_text(GTK_ENTRY(w_keycode_file));
904        if (str && strlen(str))
905                PrefsReplaceString("keycodefile", str);
906        else
907                PrefsRemoveItem("keycodefile");
1303   }
1304  
1305   // Create "Memory/Misc" pane
1306   static void create_memory_pane(GtkWidget *top)
1307   {
1308 <        GtkWidget *box, *vbox, *hbox, *hbox2, *label, *scale, *opt, *menu;
1308 >        GtkWidget *box, *hbox, *vbox, *hbox2, *label, *scale;
1309  
1310          box = make_pane(top, STR_MEMORY_MISC_PANE_TITLE);
1311  
# Line 952 | Line 1347 | static void create_memory_pane(GtkWidget
1347          gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
1348          gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
1349  
1350 <        static const opt_desc options[] = {
1350 >        static const opt_desc model_options[] = {
1351                  {STR_MODELID_5_LAB, GTK_SIGNAL_FUNC(mn_modelid_5)},
1352                  {STR_MODELID_14_LAB, GTK_SIGNAL_FUNC(mn_modelid_14)},
1353                  {0, NULL}
# Line 962 | Line 1357 | static void create_memory_pane(GtkWidget
1357                  case 5: active = 0; break;
1358                  case 14: active = 1; break;
1359          }
1360 <        menu = make_option_menu(box, STR_MODELID_CTRL, options, active);
1360 >        make_option_menu(box, STR_MODELID_CTRL, model_options, active);
1361  
1362 <        w_rom_file = make_entry(box, STR_ROM_FILE_CTRL, "rom");
1362 > #if EMULATED_68K
1363 >        static const opt_desc cpu_options[] = {
1364 >                {STR_CPU_68020_LAB, GTK_SIGNAL_FUNC(mn_cpu_68020)},
1365 >                {STR_CPU_68020_FPU_LAB, GTK_SIGNAL_FUNC(mn_cpu_68020_fpu)},
1366 >                {STR_CPU_68030_LAB, GTK_SIGNAL_FUNC(mn_cpu_68030)},
1367 >                {STR_CPU_68030_FPU_LAB, GTK_SIGNAL_FUNC(mn_cpu_68030_fpu)},
1368 >                {STR_CPU_68040_LAB, GTK_SIGNAL_FUNC(mn_cpu_68040)},
1369 >                {0, NULL}
1370 >        };
1371 >        int cpu = PrefsFindInt32("cpu");
1372 >        bool fpu = PrefsFindBool("fpu");
1373 >        active = 0;
1374 >        switch (cpu) {
1375 >                case 2: active = fpu ? 1 : 0; break;
1376 >                case 3: active = fpu ? 3 : 2; break;
1377 >                case 4: active = 4;
1378 >        }
1379 >        make_option_menu(box, STR_CPU_CTRL, cpu_options, active);
1380 > #endif
1381  
1382 <        make_checkbox(box, STR_KEYCODES_CTRL, "keycodes", GTK_SIGNAL_FUNC(tb_keycodes));
1383 <        w_keycode_file = make_entry(box, STR_KEYCODE_FILE_CTRL, "keycodefile");
1382 >        w_rom_file = make_file_entry(box, STR_ROM_FILE_CTRL, "rom");
1383 >
1384 > #ifdef HAVE_SIGSEGV_SKIP_INSTRUCTION
1385 >        make_checkbox(box, STR_IGNORESEGV_CTRL, "ignoresegv", GTK_SIGNAL_FUNC(tb_ignoresegv));
1386 > #endif
1387   }
1388  
1389  
# Line 980 | Line 1396 | static void read_settings(void)
1396          read_volumes_settings();
1397          read_scsi_settings();
1398          read_graphics_settings();
1399 +        read_input_settings();
1400          read_serial_settings();
1401          read_memory_settings();
1402 +        read_jit_settings();
1403   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines