Skip to content

Commit

Permalink
Fix OpenTTD#11696: Graphics set parameters missing from survey data (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison authored Jan 12, 2024
1 parent 479490d commit b3f31a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/survey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ void SurveyConfiguration(nlohmann::json &survey)
}
if (BaseGraphics::GetUsedSet() != nullptr) {
survey["graphics_set"] = fmt::format("{}.{}", BaseGraphics::GetUsedSet()->name, BaseGraphics::GetUsedSet()->version);
const GRFConfig *extra_cfg = BaseGraphics::GetUsedSet()->GetExtraConfig();
if (extra_cfg != nullptr && extra_cfg->num_params > 0) {
survey["graphics_set_parameters"] = span<const uint32_t>(extra_cfg->param.data(), extra_cfg->num_params);
} else {
survey["graphics_set_parameters"] = span<const uint32_t>();
}
}
if (BaseMusic::GetUsedSet() != nullptr) {
survey["music_set"] = fmt::format("{}.{}", BaseMusic::GetUsedSet()->name, BaseMusic::GetUsedSet()->version);
Expand Down

0 comments on commit b3f31a6

Please sign in to comment.