569 |
|
static GtkWidget *l_frameskip, *l_display_x, *l_display_y; |
570 |
|
static int display_type; |
571 |
|
static int dis_width, dis_height; |
572 |
+ |
static bool is_fbdev_dga_mode = false; |
573 |
|
|
574 |
|
static GtkWidget *w_dspdevice_file, *w_mixerdevice_file; |
575 |
|
|
642 |
|
display_type = DISPLAY_WINDOW; |
643 |
|
else if (sscanf(str, "dga/%d/%d", &dis_width, &dis_height) == 2) |
644 |
|
display_type = DISPLAY_SCREEN; |
645 |
+ |
#ifdef ENABLE_FBDEV_DGA |
646 |
+ |
else if (sscanf(str, "fbdev/%d/%d", &dis_width, &dis_height) == 2) { |
647 |
+ |
is_fbdev_dga_mode = true; |
648 |
+ |
display_type = DISPLAY_SCREEN; |
649 |
+ |
} |
650 |
+ |
#endif |
651 |
|
} |
652 |
|
else { |
653 |
|
uint32 window_modes = PrefsFindInt32("windowmodes"); |
704 |
|
dis_height = atoi(str); |
705 |
|
|
706 |
|
char pref[256]; |
707 |
+ |
bool use_screen_mode = true; |
708 |
|
switch (display_type) { |
709 |
|
case DISPLAY_WINDOW: |
710 |
|
sprintf(pref, "win/%d/%d", dis_width, dis_height); |
713 |
|
sprintf(pref, "dga/%d/%d", dis_width, dis_height); |
714 |
|
break; |
715 |
|
default: |
716 |
+ |
use_screen_mode = false; |
717 |
|
PrefsRemoveItem("screen"); |
718 |
|
return; |
719 |
|
} |
720 |
< |
PrefsReplaceString("screen", pref); |
720 |
> |
if (use_screen_mode) { |
721 |
> |
PrefsReplaceString("screen", pref); |
722 |
> |
// Old prefs are now migrated |
723 |
> |
PrefsRemoveItem("windowmodes"); |
724 |
> |
PrefsRemoveItem("screenmodes"); |
725 |
> |
} |
726 |
|
|
727 |
|
PrefsReplaceString("dsp", get_file_entry_path(w_dspdevice_file)); |
728 |
|
PrefsReplaceString("mixer", get_file_entry_path(w_mixerdevice_file)); |
1127 |
|
gtk_widget_show(vbox); |
1128 |
|
|
1129 |
|
gfloat min, max; |
1130 |
< |
min = 1; |
1131 |
< |
max = 256; |
1130 |
> |
min = 4; |
1131 |
> |
max = 512; |
1132 |
|
w_ramsize_adj = gtk_adjustment_new(min, min, max, 1, 16, 0); |
1133 |
|
gtk_adjustment_set_value(GTK_ADJUSTMENT(w_ramsize_adj), PrefsFindInt32("ramsize") >> 20); |
1134 |
|
|