Fix internal sound card behavior when switching machines in the settings window

This commit is contained in:
RichardG867
2020-07-27 12:25:06 -03:00
parent 0b8bd4e610
commit 95c11cf483
2 changed files with 6 additions and 3 deletions

View File

@@ -128,9 +128,6 @@ sound_log(const char *fmt, ...)
int
sound_card_available(int card)
{
if ((card == SOUND_INTERNAL) && !(machines[machine].flags & MACHINE_SOUND))
return 0;
if (sound_cards[card].device)
return device_available(sound_cards[card].device);

View File

@@ -1280,6 +1280,12 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
h = GetDlgItem(hdlg, IDC_COMBO_SOUND);
c = d = 0;
while (1) {
/* Skip "internal" if machine doesn't have it. */
if ((c == 1) && !(machines[temp_machine].flags & MACHINE_SOUND)) {
c++;
continue;
}
s = sound_card_getname(c);
if (!s[0])