Add THREADS_ENABLED macro in order to compile Godot to run on the main thread
This commit is contained in:
parent
107f2961cc
commit
bd70b8e1f6
33 changed files with 447 additions and 72 deletions
|
|
@ -2354,7 +2354,11 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
|||
|
||||
reimport_files.sort();
|
||||
|
||||
#ifdef THREADS_ENABLED
|
||||
bool use_multiple_threads = GLOBAL_GET("editor/import/use_multiple_threads");
|
||||
#else
|
||||
bool use_multiple_threads = false;
|
||||
#endif
|
||||
|
||||
int from = 0;
|
||||
for (int i = 0; i < reimport_files.size(); i++) {
|
||||
|
|
@ -2680,6 +2684,10 @@ void EditorFileSystem::remove_import_format_support_query(Ref<EditorFileSystemIm
|
|||
}
|
||||
|
||||
EditorFileSystem::EditorFileSystem() {
|
||||
#ifdef THREADS_ENABLED
|
||||
use_threads = true;
|
||||
#endif
|
||||
|
||||
ResourceLoader::import = _resource_import;
|
||||
reimport_on_missing_imported_files = GLOBAL_GET("editor/import/reimport_missing_imported_files");
|
||||
singleton = this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue