mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'check-input-device-count' into 'master'
Check for input devices before opening them See merge request kart-krew-dev/ring-racers-internal!2497
This commit is contained in:
commit
da43100681
1 changed files with 5 additions and 0 deletions
|
|
@ -992,6 +992,11 @@ boolean I_SoundInputSetEnabled(boolean enabled)
|
||||||
{
|
{
|
||||||
if (g_input_device_id == 0 && enabled)
|
if (g_input_device_id == 0 && enabled)
|
||||||
{
|
{
|
||||||
|
if (SDL_GetNumAudioDevices(true) == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_AudioSpec input_desired {};
|
SDL_AudioSpec input_desired {};
|
||||||
input_desired.format = AUDIO_F32SYS;
|
input_desired.format = AUDIO_F32SYS;
|
||||||
input_desired.channels = 1;
|
input_desired.channels = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue