summaryrefslogtreecommitdiffstats
path: root/modules/svg
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2023-12-01 13:39:09 -0500
committerAdam Scott <ascott.ca@gmail.com>2024-01-17 13:58:29 -0500
commitbd70b8e1f643dbf7252be9bc367e0de0f82d722d (patch)
treede81ebb037ede5994d3e817a2a788488d0f47977 /modules/svg
parent107f2961ccfac179af7682eb5f6e7ea91e80040c (diff)
downloadredot-engine-bd70b8e1f643dbf7252be9bc367e0de0f82d722d.tar.gz
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread
Diffstat (limited to 'modules/svg')
-rw-r--r--modules/svg/register_types.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/svg/register_types.cpp b/modules/svg/register_types.cpp
index 7b61749f61..82d816d833 100644
--- a/modules/svg/register_types.cpp
+++ b/modules/svg/register_types.cpp
@@ -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;
}