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
|
|
@ -34,6 +34,12 @@
|
|||
|
||||
#include <thorvg.h>
|
||||
|
||||
#ifdef THREADS_ENABLED
|
||||
#define TVG_THREADS 1
|
||||
#else
|
||||
#define TVG_THREADS 0
|
||||
#endif
|
||||
|
||||
static Ref<ImageLoaderSVG> image_loader_svg;
|
||||
|
||||
void initialize_svg_module(ModuleInitializationLevel p_level) {
|
||||
|
|
@ -42,7 +48,8 @@ void initialize_svg_module(ModuleInitializationLevel p_level) {
|
|||
}
|
||||
|
||||
tvg::CanvasEngine tvgEngine = tvg::CanvasEngine::Sw;
|
||||
if (tvg::Initializer::init(tvgEngine, 1) != tvg::Result::Success) {
|
||||
|
||||
if (tvg::Initializer::init(tvgEngine, TVG_THREADS) != tvg::Result::Success) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue