mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #81608 from timothyqiu/fullscreen-editor
Make editor support `--fullscreen` command-line argument
This commit is contained in:
commit
cdbc2fdaa6
@ -1026,13 +1026,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
} else if (I->get() == "-f" || I->get() == "--fullscreen") { // force fullscreen
|
} else if (I->get() == "-f" || I->get() == "--fullscreen") { // force fullscreen
|
||||||
|
|
||||||
init_fullscreen = true;
|
init_fullscreen = true;
|
||||||
|
window_mode = DisplayServer::WINDOW_MODE_FULLSCREEN;
|
||||||
} else if (I->get() == "-m" || I->get() == "--maximized") { // force maximized window
|
} else if (I->get() == "-m" || I->get() == "--maximized") { // force maximized window
|
||||||
|
|
||||||
init_maximized = true;
|
init_maximized = true;
|
||||||
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
||||||
|
|
||||||
} else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window
|
} else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window
|
||||||
|
|
||||||
init_windowed = true;
|
init_windowed = true;
|
||||||
@ -1645,7 +1643,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||||||
if (editor) {
|
if (editor) {
|
||||||
packed_data->set_disabled(true);
|
packed_data->set_disabled(true);
|
||||||
main_args.push_back("--editor");
|
main_args.push_back("--editor");
|
||||||
if (!init_windowed) {
|
if (!init_windowed && !init_fullscreen) {
|
||||||
init_maximized = true;
|
init_maximized = true;
|
||||||
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user