diff options
author | Zaven Muradyan <voithos@google.com> | 2018-10-15 08:50:29 -0700 |
---|---|---|
committer | Zaven Muradyan <voithos@google.com> | 2018-10-17 20:48:53 -0700 |
commit | 552c518b80fb14d8e35bcf1be66faf73e3728975 (patch) | |
tree | 2d5c65d9cfb165646180fc81043b44b235d2bb85 | |
parent | 451e5fd0511bc2c17a66fc73a0de9a5169109517 (diff) |
Show an alert when a project is not found in release mode
Previously, an error message would get printed to the console, but this
is problematic in e.g. Windows where a console is not displayed. In the
case of a missing .pck file, the binary would just silently fail. Now,
it shows an alert.
Fixes #21994.
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 41ae368087..e9cd183d8a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -729,7 +729,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph #ifdef TOOLS_ENABLED editor = false; #else - OS::get_singleton()->print("Error: Could not load game path '%s'.\n", project_path.ascii().get_data()); + String error_msg = "Error: Could not load game data at path '" + project_path + "'. Is the .pck file missing?\n"; + OS::get_singleton()->print(error_msg.ascii().get_data()); + OS::get_singleton()->alert(error_msg); goto error; #endif |