1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Remove NO_THREADS fallback code, Godot 4 requires thread support

This also removes `OS::can_use_threads` from the public API since it's always
true.
This commit is contained in:
Rémi Verschelde
2022-10-03 10:57:36 +02:00
parent d331b803b8
commit 54418ea659
29 changed files with 13 additions and 561 deletions

View File

@@ -1706,13 +1706,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if (rtm >= 0 && rtm < 3) {
#ifdef NO_THREADS
rtm = OS::RENDER_THREAD_UNSAFE; // No threads available on this platform.
#else
if (editor) {
rtm = OS::RENDER_THREAD_SAFE;
}
#endif
OS::get_singleton()->_render_thread_mode = OS::RenderThreadMode(rtm);
}
@@ -1932,11 +1928,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
// Print engine name and version
print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
#if !defined(NO_THREADS)
if (p_main_tid_override) {
Thread::main_thread_id = p_main_tid_override;
}
#endif
#ifdef TOOLS_ENABLED
if (editor || project_manager || cmdline_tool) {