diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-05 19:14:33 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-05 19:14:33 -0300 |
commit | 2420e46b449f4c8acdfe48c765ea52fc3e860de7 (patch) | |
tree | a49df7158f20ee6dca044c8ff7d7e81c13d83073 /main | |
parent | 684a1207c0a08889be7024d5851c224877557053 (diff) |
vsync support
-works on windows
-may not work on X11, if so please fix
-OSX does not seem to support disabling vsync
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp index 2e30ed298a..6cddea823a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -109,6 +109,7 @@ static String locale; static bool use_debug_profiler=false; static bool force_lowdpi=false; static int init_screen=-1; +static bool use_vsync=true; static String unescape_cmdline(const String& p_str) { @@ -726,6 +727,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas GLOBAL_DEF("display/fullscreen",video_mode.fullscreen); GLOBAL_DEF("display/resizable",video_mode.resizable); GLOBAL_DEF("display/borderless_window", video_mode.borderless_window); + use_vsync = GLOBAL_DEF("display/use_vsync", use_vsync); GLOBAL_DEF("display/test_width",0); GLOBAL_DEF("display/test_height",0); OS::get_singleton()->_pixel_snap=GLOBAL_DEF("display/use_2d_pixel_snap",false); @@ -876,6 +878,7 @@ Error Main::setup2() { OS::get_singleton()->set_window_position(init_custom_pos); } + OS::get_singleton()->set_use_vsync(use_vsync); register_core_singletons(); |