Skip to content

Commit

Permalink
Merge pull request #81608 from timothyqiu/fullscreen-editor
Browse files Browse the repository at this point in the history
Make editor support `--fullscreen` command-line argument
  • Loading branch information
akien-mga committed Sep 26, 2023
2 parents 538928b + cf906eb commit cdbc2fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,13 +1026,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
}
} else if (I->get() == "-f" || I->get() == "--fullscreen") { // force fullscreen

init_fullscreen = true;
window_mode = DisplayServer::WINDOW_MODE_FULLSCREEN;
} else if (I->get() == "-m" || I->get() == "--maximized") { // force maximized window

init_maximized = true;
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;

} else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window

init_windowed = true;
Expand Down Expand Up @@ -1645,7 +1643,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (editor) {
packed_data->set_disabled(true);
main_args.push_back("--editor");
if (!init_windowed) {
if (!init_windowed && !init_fullscreen) {
init_maximized = true;
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
}
Expand Down

0 comments on commit cdbc2fd

Please sign in to comment.