diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index fba7a781bf..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) { @@ -688,7 +689,10 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas #endif - input_map->load_from_globals(); + if (editor) + input_map->load_default(); //keys for editor + else + input_map->load_from_globals(); //keys for game if (video_driver=="") // specified in engine.cfg video_driver=_GLOBAL_DEF("display/driver",Variant((const char*)OS::get_singleton()->get_video_driver_name(0))); @@ -723,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); @@ -873,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(); |