[Commits] [wesnoth/wesnoth] 51f395: Don't call preprocess_file() on an empty path if f...

GitHub noreply at github.com
Fri Jun 13 04:56:40 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 51f395e16dab636205ad2f076927dab8fc854b27
      https://github.com/wesnoth/wesnoth/commit/51f395e16dab636205ad2f076927dab8fc854b27
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-13 (Fri, 13 Jun 2014)

  Changed paths:
    M src/font.cpp

  Log Message:
  -----------
  Don't call preprocess_file() on an empty path if fonts.cfg can't be found

get_wml_location() returns an empty string on failure, and there is
really no point in calling preprocess_file() on that -- it only results
in a confusing error message.

Replaces this sequence often found when Wesnoth can't resolve the path
to its data directory:

  20140612 23:37:05 error filesystem: Trying to open file with empty name.
  20140612 23:37:05 error config: Could not open file
  could not initialize fonts

... with the following one:

  20140612 23:38:52 error font: could not resolve path to fonts.cfg, file not found
  could not initialize fonts

... which should be a little bit more helpful in pointing users in the
right direction in the aforementioned case.


  Commit: 170bd82ba19be992a8ab7519650418eabcdbc898
      https://github.com/wesnoth/wesnoth/commit/170bd82ba19be992a8ab7519650418eabcdbc898
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-13 (Fri, 13 Jun 2014)

  Changed paths:
    M changelog
    M src/game.cpp

  Log Message:
  -----------
  Suggest checking the data dir path when unable to initialize fonts

Not being able to initialize fonts is usually the direct consequence of
a failure to read data/hardwired/fonts.cfg, possibly because the game
data dir was incorrectly set or detected. Thus, it's the ideal point
during early initialization to provide a hint on stderr for players.

I specifically avoided mentioning anything about "installing" the game
so as to not contribute to the common misconception that the game needs
to be installed to run.


Compare: https://github.com/wesnoth/wesnoth/compare/e0426095fd04...170bd82ba19b


More information about the Commits mailing list