ref: 3c4a36a34df0c3f2a33a1a2330a7a34eefc43c6e
parent: 01c80a14685fe493b019a4e1e02cdababf452825
author: Christopher Snowhill <kode54@gmail.com>
date: Mon Mar 29 11:27:56 EDT 2021
Fix macOS default audio output device if the config string is empty
--- a/src/ft2_audioselector.c
+++ b/src/ft2_audioselector.c
@@ -54,6 +54,11 @@
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);
}