1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Implement no-window mode for X11 and MacOS

Bonus: Homogeinize and improve OS::alert() for no-window mode
This commit is contained in:
Pedro J. Estébanez
2020-09-23 13:43:51 +02:00
parent 1a14551f1f
commit 3ec62c82a3
6 changed files with 96 additions and 16 deletions

View File

@@ -259,7 +259,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n");
OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n");
OS::get_singleton()->print(" --no-window Run with invisible window. Useful together with --script.\n");
OS::get_singleton()->print(" --enable-vsync-via-compositor When vsync is enabled, vsync via the OS' window compositor (Windows only).\n");
OS::get_singleton()->print(" --disable-vsync-via-compositor Disable vsync via the OS' window compositor (Windows only).\n");
OS::get_singleton()->print(" --tablet-driver Tablet input driver (");
@@ -609,7 +609,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "--low-dpi") { // force low DPI (macOS only)
force_lowdpi = true;
} else if (I->get() == "--no-window") { // disable window creation (Windows only)
} else if (I->get() == "--no-window") { // run with an invisible window
OS::get_singleton()->set_no_window_mode(true);
} else if (I->get() == "--tablet-driver") {