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.
This commit is contained in:
Juan Linietsky
2017-12-16 17:09:25 -03:00
parent d03f35f1bc
commit 652c98a7be
14 changed files with 61 additions and 18 deletions

View File

@ -2288,19 +2288,19 @@ String OS_Windows::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
void OS_Windows::set_use_vsync(bool p_enable) {
void OS_Windows::_set_use_vsync(bool p_enable) {
if (gl_context)
gl_context->set_use_vsync(p_enable);
}
/*
bool OS_Windows::is_vsync_enabled() const {
if (gl_context)
return gl_context->is_using_vsync();
return true;
}
}*/
OS::PowerState OS_Windows::get_power_state() {
return power_manager->get_power_state();