summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_wrap_mt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/visual_server_wrap_mt.cpp')
-rw-r--r--servers/visual/visual_server_wrap_mt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp
index b86a0ae3f6..e55b7a9309 100644
--- a/servers/visual/visual_server_wrap_mt.cpp
+++ b/servers/visual/visual_server_wrap_mt.cpp
@@ -158,9 +158,19 @@ void VisualServerWrapMT::finish() {
canvas_occluder_polygon_free_cached_ids();
}
+void VisualServerWrapMT::set_use_vsync_callback(bool p_enable) {
+
+ singleton_mt->call_set_use_vsync(p_enable);
+}
+
+VisualServerWrapMT *VisualServerWrapMT::singleton_mt = NULL;
+
VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) :
command_queue(p_create_thread) {
+ singleton_mt = this;
+ OS::switch_vsync_function = set_use_vsync_callback; //as this goes to another thread, make sure it goes properly
+
visual_server = p_contained;
create_thread = p_create_thread;
thread = NULL;