Commit fbbd0270ebb76d3e55dd0052c98587d22103cd82

Christian Kündig 2022-03-18T23:10:19

Fix "SDL_TRUE is not defined" runtime error for emscripten.

diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c
index a5b1533..94d2231 100644
--- a/src/audio/emscripten/SDL_emscriptenaudio.c
+++ b/src/audio/emscripten/SDL_emscriptenaudio.c
@@ -361,9 +361,9 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
     /* check availability */
     available = EM_ASM_INT_V({
         if (typeof(AudioContext) !== 'undefined') {
-            return SDL_TRUE;
+            return true;
         } else if (typeof(webkitAudioContext) !== 'undefined') {
-            return SDL_TRUE;
+            return true;
         }
         return SDL_FALSE;
     });
@@ -374,9 +374,9 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
 
     capture_available = available && EM_ASM_INT_V({
         if ((typeof(navigator.mediaDevices) !== 'undefined') && (typeof(navigator.mediaDevices.getUserMedia) !== 'undefined')) {
-            return SDL_TRUE;
+            return true;
         } else if (typeof(navigator.webkitGetUserMedia) !== 'undefined') {
-            return SDL_TRUE;
+            return true;
         }
         return SDL_FALSE;
     });