Merge branch 'master' into jgrpp
# Conflicts: # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj.filters # src/base_consist.h # src/company_base.h # src/newgrf_config.cpp # src/newgrf_config.h # src/openttd.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/saveload/station_sl.cpp # src/settings.cpp # src/signs_base.h # src/string.cpp # src/string_func.h # src/table/misc_settings.ini # src/table/settings.h.preamble # src/town_cmd.cpp # src/vehicle.cpp # src/vehicle_cmd.cpp # src/video/cocoa/cocoa_v.mm # src/video/null_v.cpp
This commit is contained in:
@@ -50,10 +50,10 @@ void ShowNewGRFError()
|
||||
/* We only want to show fatal errors */
|
||||
if (c->error == nullptr || c->error->severity != STR_NEWGRF_ERROR_MSG_FATAL) continue;
|
||||
|
||||
SetDParam (0, c->error->custom_message == nullptr ? c->error->message : STR_JUST_RAW_STRING);
|
||||
SetDParamStr(1, c->error->custom_message);
|
||||
SetDParam (0, c->error->message != STR_NULL ? c->error->message : STR_JUST_RAW_STRING);
|
||||
SetDParamStr(1, c->error->custom_message.c_str());
|
||||
SetDParamStr(2, c->filename);
|
||||
SetDParamStr(3, c->error->data);
|
||||
SetDParamStr(3, c->error->data.c_str());
|
||||
for (uint i = 0; i < lengthof(c->error->param_value); i++) {
|
||||
SetDParam(4 + i, c->error->param_value[i]);
|
||||
}
|
||||
@@ -66,13 +66,13 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint
|
||||
{
|
||||
if (c->error != nullptr) {
|
||||
char message[512];
|
||||
SetDParamStr(0, c->error->custom_message); // is skipped by built-in messages
|
||||
SetDParamStr(0, c->error->custom_message.c_str()); // is skipped by built-in messages
|
||||
SetDParamStr(1, c->filename);
|
||||
SetDParamStr(2, c->error->data);
|
||||
SetDParamStr(2, c->error->data.c_str());
|
||||
for (uint i = 0; i < lengthof(c->error->param_value); i++) {
|
||||
SetDParam(3 + i, c->error->param_value[i]);
|
||||
}
|
||||
GetString(message, c->error->custom_message == nullptr ? c->error->message : STR_JUST_RAW_STRING, lastof(message));
|
||||
GetString(message, c->error->message != STR_NULL ? c->error->message : STR_JUST_RAW_STRING, lastof(message));
|
||||
|
||||
SetDParamStr(0, message);
|
||||
y = DrawStringMultiLine(x, right, y, bottom, c->error->severity);
|
||||
@@ -927,7 +927,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
||||
list.emplace_back(new DropDownListStringItem(STR_NONE, -1, false));
|
||||
|
||||
for (uint i = 0; i < this->grf_presets.size(); i++) {
|
||||
list.emplace_back(new DropDownListCharStringItem(this->grf_presets[i].c_str(), i, false));
|
||||
list.emplace_back(new DropDownListCharStringItem(this->grf_presets[i], i, false));
|
||||
}
|
||||
|
||||
this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
|
||||
|
Reference in New Issue
Block a user