Abstracted away the machine bus'es and flags in order to make the rest of the emulator agnostic as to how they're stored.

This commit is contained in:
OBattler
2021-12-13 01:23:06 +01:00
parent 6fd2cfaf90
commit 6661ff5dcc
15 changed files with 82 additions and 57 deletions

View File

@@ -274,7 +274,7 @@ void
video_pre_reset(int card)
{
if ((card == VID_NONE) || \
(card == VID_INTERNAL) || (machines[machine].flags & MACHINE_VIDEO_ONLY))
(card == VID_INTERNAL) || machine_has_flags(machine, MACHINE_VIDEO_ONLY))
video_prepare();
}
@@ -287,13 +287,13 @@ video_reset(int card)
return;
vid_table_log("VIDEO: reset (gfxcard=%d, internal=%d)\n",
card, (machines[machine].flags & MACHINE_VIDEO)?1:0);
card, machine_has_flags(machine, MACHINE_VIDEO) ? 1 : 0);
loadfont("roms/video/mda/mda.rom", 0);
/* Do not initialize internal cards here. */
if (!(card == VID_NONE) && \
!(card == VID_INTERNAL) && !(machines[machine].flags & MACHINE_VIDEO_ONLY)) {
!(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].name);
video_prepare();