diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:21:36 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:21:36 +0100 |
commit | d642274f75fb8ca6d3b9d4c314269e6f559051c7 (patch) | |
tree | 7dbf61077d234d636dfd33f85007bcc06f66fb69 /core | |
parent | 3579d7a9f74e3f1eda88826897feb4b866d75ec9 (diff) | |
parent | 2718a7b7d39962100e59b8616077603034d77f8e (diff) |
Merge pull request #70939 from bruvzg/win_screen_2
Add support for the custom initial screen for the main window, fix primary screen detection.
Diffstat (limited to 'core')
-rw-r--r-- | core/config/project_settings.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 2ce3ce2678..0bf7430d84 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1240,6 +1240,14 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF_BASIC("display/window/size/mode", 0); custom_prop_info["display/window/size/mode"] = PropertyInfo(Variant::INT, "display/window/size/mode", PROPERTY_HINT_ENUM, "Windowed,Minimized,Maximized,Fullscreen,Exclusive Fullscreen"); + // Keep the enum values in sync with the `DisplayServer::SCREEN_` enum. + GLOBAL_DEF_BASIC("display/window/size/initial_screen", -2); + String screen_hints = "Primary Monitor:-2"; // Note: Main Window Monitor:-1 is not used for the main window, skip it. + for (int i = 0; i < 64; i++) { + screen_hints += ",Monitor " + itos(i + 1) + ":" + itos(i); + } + custom_prop_info["display/window/size/initial_screen"] = PropertyInfo(Variant::INT, "display/window/size/initial_screen", PROPERTY_HINT_ENUM, screen_hints); + GLOBAL_DEF_BASIC("display/window/size/resizable", true); GLOBAL_DEF_BASIC("display/window/size/borderless", false); GLOBAL_DEF("display/window/size/always_on_top", false); |