From fbbd0270ebb76d3e55dd0052c98587d22103cd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=CC=88ndig?= Date: Fri, 18 Mar 2022 23:10:19 +0100 Subject: [PATCH] Fix "SDL_TRUE is not defined" runtime error for emscripten. --- src/audio/emscripten/SDL_emscriptenaudio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c index a5b153368..94d223147 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; });