summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-12-16 17:09:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-12-16 17:11:02 -0300
commit652c98a7beb8fc8a8aad5075a673caf21994a2ba (patch)
treecaa203abb2bcdb839f6bc7568d7119aa948120db /platform/osx
parentd03f35f1bc0ecf09d436ebb44356f8add5b95a3e (diff)
Add epic hack so vsync can be toggled in run-time from script. Fixes #14458.
Call needs to be routed via visual server to reach the proper thread.
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm6
2 files changed, 5 insertions, 5 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index ede50a05ba..2381b85658 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -215,8 +215,8 @@ public:
virtual bool _check_internal_feature_support(const String &p_feature);
- virtual void set_use_vsync(bool p_enable);
- virtual bool is_vsync_enabled() const;
+ virtual void _set_use_vsync(bool p_enable);
+ //virtual bool is_vsync_enabled() const;
void run();
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index f3809e6eed..aab37cb59c 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -2063,14 +2063,14 @@ Error OS_OSX::move_to_trash(const String &p_path) {
return OK;
}
-void OS_OSX::set_use_vsync(bool p_enable) {
+void OS_OSX::_set_use_vsync(bool p_enable) {
CGLContextObj ctx = CGLGetCurrentContext();
if (ctx) {
GLint swapInterval = p_enable ? 1 : 0;
CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
}
}
-
+/*
bool OS_OSX::is_vsync_enabled() const {
GLint swapInterval = 0;
CGLContextObj ctx = CGLGetCurrentContext();
@@ -2079,7 +2079,7 @@ bool OS_OSX::is_vsync_enabled() const {
}
return swapInterval ? true : false;
}
-
+*/
OS_OSX *OS_OSX::singleton = NULL;
OS_OSX::OS_OSX() {