Don't try to open the mic device every time if SDL says it has none
Fixes the UI hanging up on Windows 11 when there are no mics, but the mic input is set to external device as it is by default.
This commit is contained in:
parent
0947e941b8
commit
ca5e8792c8
|
@ -126,6 +126,10 @@ void MicOpen()
|
|||
return;
|
||||
}
|
||||
|
||||
int numMics = SDL_GetNumAudioDevices(1);
|
||||
if (numMics == 0)
|
||||
return;
|
||||
|
||||
SDL_AudioSpec whatIwant, whatIget;
|
||||
memset(&whatIwant, 0, sizeof(SDL_AudioSpec));
|
||||
whatIwant.freq = 44100;
|
||||
|
|
Loading…
Reference in New Issue