Changeset - r27121:08906f7228b9
[Not reviewed]
master
0 1 0
PeterN - 14 months ago 2023-04-20 16:04:07
peter1138@openttd.org
Change: Failure to load a savegame is critical. (#10682)

Marking the error message critical ensures it is queued if multiple errors occured.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -1093,7 +1093,7 @@ void SwitchToMode(SwitchMode new_mode)
 

	
 
			if (!SafeLoad(_file_to_saveload.name, _file_to_saveload.file_op, _file_to_saveload.detail_ftype, GM_NORMAL, NO_DIRECTORY)) {
 
				SetDParamStr(0, GetSaveLoadErrorString());
 
				ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
 
				ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_CRITICAL);
 
			} else {
 
				if (_file_to_saveload.abstract_ftype == FT_SCENARIO) {
 
					OnStartScenario();
 
@@ -1125,7 +1125,7 @@ void SwitchToMode(SwitchMode new_mode)
 
				Command<CMD_PAUSE>::Post(PM_PAUSED_SAVELOAD, false);
 
			} else {
 
				SetDParamStr(0, GetSaveLoadErrorString());
 
				ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
 
				ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_CRITICAL);
 
			}
 
			break;
 
		}
0 comments (0 inline, 0 general)