--- uae/src/gtkui.c 2018/04/24 16:43:28 1.1.1.3 +++ uae/src/gtkui.c 2018/04/24 16:44:50 1.1.1.4 @@ -29,6 +29,15 @@ #include +/* One of the 1.1.6 "features" is a gratuitous name change */ +#ifndef HAVE_GTK_FEATURES_1_1_6 +#define gtk_container_set_border_width gtk_container_border_width +#endif +/* Likewise for 1.1.8. */ +#ifndef HAVE_GTK_FEATURES_1_1_8 +#define gtk_label_set_text gtk_label_set +#endif + static int gui_active; static GtkWidget *disk_insert_widget[4], *disk_eject_widget[4], *disk_text_widget[4]; @@ -68,7 +77,7 @@ static void save_config (void) fprintf (stderr, "Error saving options file!\n"); return; } - save_options (f); + save_options (f, &currprefs); fclose (f); } @@ -122,8 +131,8 @@ static void set_sound_state (void) static void set_joy_state (void) { - int j0t = changed_prefs.fake_joystick & 255; - int j1t = (changed_prefs.fake_joystick >> 8) & 255; + int j0t = changed_prefs.jport0; + int j1t = changed_prefs.jport1; int i; if (j0t == j1t) { @@ -172,7 +181,7 @@ static int my_idle (void) switch (cmd) { case 0: n = read_comm_pipe_int_blocking (&to_gui_pipe); - gtk_label_set (GTK_LABEL (disk_text_widget[n]), currprefs.df[n]); + gtk_label_set_text (GTK_LABEL (disk_text_widget[n]), currprefs.df[n]); break; case 1: /* Initialization. */ @@ -214,15 +223,11 @@ static int find_current_toggle (GtkWidge static void joy_changed (void) { - int j0t = 0, j1t = 0; - int i; if (! gui_active) return; - j0t = find_current_toggle (joy_widget[0], 6); - j1t = find_current_toggle (joy_widget[1], 6); - - changed_prefs.fake_joystick = j0t | (j1t << 8); + changed_prefs.jport0 = find_current_toggle (joy_widget[0], 6); + changed_prefs.jport1 = find_current_toggle (joy_widget[1], 6); set_joy_state (); } @@ -448,7 +453,7 @@ static GtkWidget *make_radio_group_box ( frame = gtk_frame_new (title); newbox = (horiz ? gtk_hbox_new : gtk_vbox_new) (FALSE, 4); gtk_widget_show (newbox); - gtk_container_border_width (GTK_CONTAINER (newbox), 4); + gtk_container_set_border_width (GTK_CONTAINER (newbox), 4); gtk_container_add (GTK_CONTAINER (frame), newbox); make_radio_group (labels, newbox, saveptr, horiz, !horiz, sigfunc); return frame; @@ -510,7 +515,7 @@ static void make_floppy_disks (GtkWidget sprintf (buf, "DF%d:", i); thing = gtk_frame_new (buf); buttonbox = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (buttonbox), 4); + gtk_container_set_border_width (GTK_CONTAINER (buttonbox), 4); gtk_container_add (GTK_CONTAINER (thing), buttonbox); gtk_box_pack_start (GTK_BOX (vbox), thing, FALSE, TRUE, 0); gtk_widget_show (buttonbox); @@ -561,7 +566,7 @@ static GtkWidget *make_cpu_speed_sel (vo frame = gtk_frame_new ("CPU speed"); newbox = gtk_vbox_new (FALSE, 4); gtk_widget_show (newbox); - gtk_container_border_width (GTK_CONTAINER (newbox), 4); + gtk_container_set_border_width (GTK_CONTAINER (newbox), 4); gtk_container_add (GTK_CONTAINER (frame), newbox); make_radio_group (labels, newbox, cpuspeed_widgets, 0, 1, cpuspeed_changed); @@ -610,7 +615,7 @@ static void make_cpu_widgets (GtkWidget gtk_widget_show (frame); newbox = gtk_vbox_new (FALSE, 4); gtk_widget_show (newbox); - gtk_container_border_width (GTK_CONTAINER (newbox), 4); + gtk_container_set_border_width (GTK_CONTAINER (newbox), 4); gtk_container_add (GTK_CONTAINER (frame), newbox); a24m_widget = gtk_check_button_new_with_label ("24 bit address space"); @@ -760,7 +765,7 @@ static void *gtk_penguin (void *dummy) vbox = gtk_vbox_new (FALSE, 4); gtk_container_add (GTK_CONTAINER (window), vbox); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); /* First line - buttons and power LED */ hbox = gtk_hbox_new (FALSE, 10); @@ -795,7 +800,7 @@ static void *gtk_penguin (void *dummy) for (i = 0; i < sizeof pages / sizeof (struct _pages); i++) { thing = gtk_vbox_new (FALSE, 4); gtk_widget_show (thing); - gtk_container_border_width (GTK_CONTAINER (thing), 10); + gtk_container_set_border_width (GTK_CONTAINER (thing), 10); pages[i].createfunc (thing); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), thing, gtk_label_new (pages[i].title)); } @@ -863,7 +868,11 @@ void gui_exit (void) uae_sem_wait (&gui_quit_sem); } -void gui_led(int num, int on) +void gui_fps (int x) +{ +} + +void gui_led (int num, int on) { if (no_gui) return;