From cf906ebc9b00f427059c6b55cb53bf759f1e2419 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 13 Sep 2023 16:19:11 +0800 Subject: [PATCH] Make editor support `--fullscreen` command-line argument --- main/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index aa2f5f2451a..b2be786cb14 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1012,13 +1012,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; @@ -1603,7 +1601,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; }