8514/A and XGA handling refactor:

* separate (ibm8514|xga)_enabled into (ibm8514|xga)_standalone_enabled
  and (ibm8514|xga)_active, the former being enabled only for standalone
  8514/A or XGA cards, the latter for all 8514/A and XGA-capable cards
  and not saved into the config file;
* remove (ibm8514|xga)_has_vga and replace all uses of it with
  (ibm8514|xga)_standalone_enabled;
* Qt UI: the checkboxes for standalone 8514/A and XGA are now correctly
  grayed out if an (S)VGA card with 8514/A or XGA capability is selected,
  including cases when the card is an internal/onboard one; said cards are
  now no longer appear as SVGA multi-monitor compatible.
This commit is contained in:
Alexander Babikov
2023-08-22 17:56:55 +05:00
parent e3cc8eaf5d
commit ef631a8133
12 changed files with 85 additions and 84 deletions

View File

@@ -564,9 +564,16 @@ load_video(void)
free(p);
}
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_8514)
ini_section_delete_var(cat, "8514a");
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_XGA)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_XGA)
ini_section_delete_var(cat, "xga");
voodoo_enabled = !!ini_section_get_int(cat, "voodoo", 0);
ibm8514_enabled = !!ini_section_get_int(cat, "8514a", 0);
xga_enabled = !!ini_section_get_int(cat, "xga", 0);
ibm8514_standalone_enabled = !!ini_section_get_int(cat, "8514a", 0);
ibm8514_active = ibm8514_standalone_enabled;
xga_standalone_enabled = !!ini_section_get_int(cat, "xga", 0);
xga_active = xga_standalone_enabled;
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
@@ -2352,15 +2359,15 @@ save_video(void)
else
ini_section_set_int(cat, "voodoo", voodoo_enabled);
if (ibm8514_enabled == 0)
if (ibm8514_standalone_enabled == 0)
ini_section_delete_var(cat, "8514a");
else
ini_section_set_int(cat, "8514a", ibm8514_enabled);
ini_section_set_int(cat, "8514a", ibm8514_standalone_enabled);
if (xga_enabled == 0)
if (xga_standalone_enabled == 0)
ini_section_delete_var(cat, "xga");
else
ini_section_set_int(cat, "xga", xga_enabled);
ini_section_set_int(cat, "xga", xga_standalone_enabled);
if (gfxcard[1] == 0)
ini_section_delete_var(cat, "gfxcard_2");