diff --git a/changelog b/changelog index e51ff68d4355..12bc4630a7b6 100644 --- a/changelog +++ b/changelog @@ -53,6 +53,8 @@ Version 1.11.15+dev: * Fix bug #22147: Assertion error when a network error is thrown during the game. * Removed the YetAnotherMapGenerator (not finished) * Fix bug #22134: Campaign prefix not used in mp campaign saves + * Made the error messages sent to stderr when the core data dir is + incorrectly set more helpful. Version 1.11.15: * Graphics: diff --git a/src/game.cpp b/src/game.cpp index 0f39b5019485..053249f9a0e5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -414,6 +414,15 @@ static void init_locale() { textdomain (PACKAGE); } +static void warn_early_init_failure() +{ + // NOTE: wrap output to 80 columns. + std::cerr << '\n' + << "An error at this point during initialization usually indicates that the data\n" + << "directory above was not correctly set or detected. Try passing the correct path\n" + << "in the command line with the --config-dir switch or as the only argument.\n"; +} + /** * Setups the game environment and enters * the titlescreen or game loops. @@ -443,6 +452,7 @@ static int do_gameloop(int argc, char** argv) res = font::load_font_config(); if(res == false) { std::cerr << "could not initialize fonts\n"; + warn_early_init_failure(); return 1; }