summaryrefslogtreecommitdiff
path: root/core/os/os.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r--core/os/os.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index d81e70e612..7010d44930 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -536,12 +536,21 @@ String OS::get_joy_guid(int p_device) const {
void OS::set_context(int p_context) {
}
+
+OS::SwitchVSyncCallbackInThread OS::switch_vsync_function = NULL;
+
void OS::set_use_vsync(bool p_enable) {
+ _use_vsync = p_enable;
+ if (switch_vsync_function) { //if a function was set, use function
+ switch_vsync_function(p_enable);
+ } else { //otherwise just call here
+ _set_use_vsync(p_enable);
+ }
}
bool OS::is_vsync_enabled() const {
- return true;
+ return _use_vsync;
}
OS::PowerState OS::get_power_state() {