From cfb9c810a820f694c5fe6991311b37a80f46d830 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 22 May 2024 19:47:25 +0300 Subject: [PATCH] Fix TTS configuration loaded too early. --- platform/javascript/os_javascript.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 737c8d68a..ac47d1b7f 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -908,6 +908,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, swap_ok_cancel = pandemonium_js_display_is_swap_ok_cancel() == 1; + tts = GLOBAL_GET("audio/general/text_to_speech"); + EmscriptenWebGLContextAttributes attributes; emscripten_webgl_init_context_attributes(&attributes); attributes.alpha = GLOBAL_GET("display/window/per_pixel_transparency/allowed"); @@ -1330,8 +1332,6 @@ OS_JavaScript *OS_JavaScript::get_singleton() { } OS_JavaScript::OS_JavaScript() { - tts = GLOBAL_GET("audio/general/text_to_speech"); - // Expose method for requesting quit. pandemonium_js_os_request_quit_cb(&request_quit_callback); // Set canvas ID @@ -1349,6 +1349,7 @@ OS_JavaScript::OS_JavaScript() { main_loop = NULL; rendering_server = NULL; + tts = false; swap_ok_cancel = false; idb_available = pandemonium_js_os_fs_is_persistent() != 0; idb_needs_sync = false;