[wesnoth-commits] [wesnoth/wesnoth] 57ef82: bi: Make game distribution channel part of the bui...
Iris Morelle
noreply at github.com
Sun Jan 26 04:50:35 UTC 2020
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 57ef823750734154453a563e1e1fcc387ddd07de
https://github.com/wesnoth/wesnoth/commit/57ef823750734154453a563e1e1fcc387ddd07de
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-01-26 (Sun, 26 Jan 2020)
Changed paths:
M src/build_info.cpp
M src/build_info.hpp
M src/game_initialization/multiplayer.cpp
Log Message:
-----------
bi: Make game distribution channel part of the build_info API
This moves the relevant code out of the MP game setup flow into a
dedicated function, so it can also be used in the --report output.
However, it also fixes two bugs we just found out with the previous
code:
* The channel id was extracted using istream's formatted input
operator, resulting in everything beyond the very first word being
skipped.
* The channel id was expected to be stored in ./data/dist rather than
<game data dir>/data/dist. This causes issues whenever the process
working dir is not the game data dir (most notably on X11 when
launching with distribution-provided .desktop files) because the file
won't be found.
So now the file is read by swallowing the first line and stripping
whitespace around, as well as using game_config::path (guaranteed to be
non-empty by the time the game makes actual use of this info).
More information about the Commits
mailing list