Register as an editor instance when generating the GDNative API JSON

This enables the automatic GLES2 fallback if the hardware
doesn't support the GLES3 backend.

This closes #27768.
This commit is contained in:
Hugo Locurcio 2019-08-19 16:14:58 +02:00
parent cce148b024
commit 3d61ca5696
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C

View File

@ -599,6 +599,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
auto_build_solutions = true;
editor = true;
#ifdef DEBUG_METHODS_ENABLED
} else if (I->get() == "--gdnative-generate-json-api") {
// Register as an editor instance to use the GLES2 fallback automatically on hardware that doesn't support the GLES3 backend
editor = true;
// We still pass it to the main arguments since the argument handling itself is not done in this function
main_args.push_back(I->get());
#endif
} else if (I->get() == "--export" || I->get() == "--export-debug") { // Export project
editor = true;