Fix internal sound card behavior when switching machines in the settings window
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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])
|
||||
|
Reference in New Issue
Block a user