diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-06 15:55:43 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-06 15:55:43 +0100 |
commit | 12b4a263ee3dd9b5a8ffba28b4e5abecc2b4f328 (patch) | |
tree | b5ec66dbec8dcb95af8440bdeadd4e3ac8fce06d /servers/display_server.cpp | |
parent | 1836b4b79874e76cfc913a988423ea2b3dfad64c (diff) | |
parent | 1778301cd008bb791fd27239e0f2659ae640e351 (diff) |
Merge pull request #67730 from KoBeWi/late_to_the_call
Add call_deferred() method to Callable
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r-- | servers/display_server.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 07cb59aaee..1897612562 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -302,19 +302,12 @@ void DisplayServer::tts_post_utterance_event(TTSUtteranceEvent p_event, int p_id case DisplayServer::TTS_UTTERANCE_ENDED: case DisplayServer::TTS_UTTERANCE_CANCELED: { if (utterance_callback[p_event].is_valid()) { - Variant args[1]; - args[0] = p_id; - const Variant *argp[] = { &args[0] }; - utterance_callback[p_event].call_deferredp(argp, 1); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession. + utterance_callback[p_event].call_deferred(p_id); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession. } } break; case DisplayServer::TTS_UTTERANCE_BOUNDARY: { if (utterance_callback[p_event].is_valid()) { - Variant args[2]; - args[0] = p_pos; - args[1] = p_id; - const Variant *argp[] = { &args[0], &args[1] }; - utterance_callback[p_event].call_deferredp(argp, 2); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession. + utterance_callback[p_event].call_deferred(p_pos, p_id); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession. } } break; default: |