diff options
author | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-07-12 03:35:51 +0200 |
---|---|---|
committer | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-07-12 03:35:51 +0200 |
commit | 74ab336fe349fc1a82785bcbfc22ad8c82c0e931 (patch) | |
tree | 177d7c9f7acc9a15a90144a941dc200b90eabe27 /main | |
parent | d1f25bb5fc42afc5a03ec213c98a5e8b9fff623d (diff) |
Change VSync mode project setting enum type from string to integer
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/main/main.cpp b/main/main.cpp index 2b5f8d9315..1ab36701ff 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1335,20 +1335,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph window_orientation = DisplayServer::ScreenOrientation(int(GLOBAL_DEF_BASIC("display/window/handheld/orientation", DisplayServer::ScreenOrientation::SCREEN_LANDSCAPE))); } { - String vsync_mode = GLOBAL_DEF("display/window/vsync/vsync_mode", "Enabled"); - - if (vsync_mode == "Disabled") { - window_vsync_mode = DisplayServer::VSYNC_DISABLED; - } else if (vsync_mode == "Enabled") { - window_vsync_mode = DisplayServer::VSYNC_ENABLED; - } else if (vsync_mode == "Adaptive") { - window_vsync_mode = DisplayServer::VSYNC_ADAPTIVE; - } else if (vsync_mode == "Mailbox") { - window_vsync_mode = DisplayServer::VSYNC_MAILBOX; - } else { - WARN_PRINT("VSync mode unknown."); - window_vsync_mode = DisplayServer::VSYNC_ENABLED; - } + window_vsync_mode = DisplayServer::VSyncMode(int(GLOBAL_DEF("display/window/vsync/vsync_mode", DisplayServer::VSyncMode::VSYNC_ENABLED))); } Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF_BASIC("physics/common/physics_fps", 60)); ProjectSettings::get_singleton()->set_custom_property_info("physics/common/physics_fps", |