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

@ -126,9 +126,7 @@ int OS_Unix::unix_initialize_audio(int p_audio_driver) {
}
void OS_Unix::initialize_core() {
#if !defined(NO_THREADS)
init_thread_posix();
#endif
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_RESOURCES);
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_USERDATA);

View file

@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(NO_THREADS)
#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
#include "thread_posix.h"
@ -73,4 +73,4 @@ void init_thread_posix() {
Thread::_set_platform_funcs(&set_name, nullptr);
}
#endif
#endif // UNIX_ENABLED || PTHREAD_ENABLED

View file

@ -31,8 +31,6 @@
#ifndef THREAD_POSIX_H
#define THREAD_POSIX_H
#if !defined(NO_THREADS)
void init_thread_posix();
#endif
#endif // THREAD_POSIX_H