Add THREADS_ENABLED macro in order to compile Godot to run on the main thread

This commit is contained in:
Adam Scott 2023-12-01 13:39:09 -05:00
parent 107f2961cc
commit bd70b8e1f6
No known key found for this signature in database
GPG key ID: 1352C2919D96DDDF
33 changed files with 447 additions and 72 deletions

View file

@ -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;
}