Skip to content

Commit

Permalink
Fix TTS configuration loaded too early.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg authored and Relintai committed Sep 7, 2024
1 parent 8479340 commit cfb9c81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platform/javascript/os_javascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit cfb9c81

Please sign in to comment.