ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit 3c4a36a34df0c3f2a33a1a2330a7a34eefc43c6e
parent 01c80a14685fe493b019a4e1e02cdababf452825
Author: Christopher Snowhill <kode54@gmail.com>
Date:   Mon, 29 Mar 2021 15:27:29 -0700

Fix macOS default audio output device if the config string is empty

Diffstat:
Msrc/ft2_audioselector.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/ft2_audioselector.c b/src/ft2_audioselector.c @@ -54,6 +54,11 @@ char *getAudioOutputDeviceFromConfig(void) devString[devStringLen-1] = '\0'; devString[devStringLen+1] = '\0'; // UTF-8 needs double null termination +#if defined(__APPLE__) + if (devString[0] == '\0') + return NULL; // macOS SDL2 locks up indefinitely if fed an empty string for device name +#endif + fclose(f); }