We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fca3a22 + 7a25173 commit e7b11d1Copy full SHA for e7b11d1
core/string/translation.cpp
@@ -80,8 +80,10 @@ void Translation::set_locale(const String &p_locale) {
80
if (Thread::is_main_thread()) {
81
_notify_translation_changed_if_applies();
82
} else {
83
- // Avoid calling non-thread-safe functions here.
84
- callable_mp(this, &Translation::_notify_translation_changed_if_applies).call_deferred();
+ // This has to happen on the main thread (bypassing the ResourceLoader per-thread call queue)
+ // because it interacts with the generally non-thread-safe window management, leading to
85
+ // different issues across platforms otherwise.
86
+ MessageQueue::get_main_singleton()->push_callable(callable_mp(this, &Translation::_notify_translation_changed_if_applies));
87
}
88
89
0 commit comments