summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-09-20 15:06:46 +0200
committerGitHub <noreply@github.com>2021-09-20 15:06:46 +0200
commitaa4ff588c92ddaaec502336fd3fc4a13d9148c9d (patch)
treed10824e1b6aeda71433893e29313518f418c42d5
parent132ad856704696942e5cbec83f871373ab068248 (diff)
parent87fb9297e3dcc28ddc844ecb9a3d4f9161f02da2 (diff)
Merge pull request #52312 from Calinou/no-main-scene-gui-alert
Display an alert when attempting to run a project with no main scene
-rw-r--r--main/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 532b1e80c9..fc24010e7b 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1090,7 +1090,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
editor = false;
#else
const String error_msg = "Error: Couldn't load project data at path \"" + project_path + "\". Is the .pck file missing?\nIf you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension).\n";
- OS::get_singleton()->print("%s", error_msg.ascii().get_data());
+ OS::get_singleton()->print("%s", error_msg.utf8().get_data());
OS::get_singleton()->alert(error_msg);
goto error;
@@ -1184,7 +1184,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#ifdef TOOLS_ENABLED
if (!editor && !project_manager) {
#endif
- OS::get_singleton()->print("Error: Can't run project: no main scene defined.\n");
+ const String error_msg = "Error: Can't run project: no main scene defined in the project.\n";
+ OS::get_singleton()->print("%s", error_msg.utf8().get_data());
+ OS::get_singleton()->alert(error_msg);
goto error;
#ifdef TOOLS_ENABLED
}