| 151 | } |
| 152 | |
| 153 | bool LoadXMLRetryable(TiXmlDocument &doc, |
| 154 | const std::string &path, |
| 155 | const std::string type) { |
| 156 | char abs_path[kPathSize]; |
| 157 | bool retry = true; |
| 158 | if (FindFilePath(path.c_str(), abs_path, kPathSize, kDataPaths | kModPaths | kAbsPath) == -1) { |
| 159 | ErrorResponse err; |
| 160 | while (retry) { |
| 161 | err = DisplayError("Error", |
| 162 | (type + " file \"" + path + "\" did not load correctly.").c_str(), |
| 163 | _ok_cancel_retry); |
| 164 | if (err != _retry) { |
| 165 | return false; |
| 166 | } |
| 167 | if (FindFilePath(path.c_str(), abs_path, kPathSize, kDataPaths | kModPaths | kAbsPath) != -1) { |
| 168 | retry = false; |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | doc.LoadFile(abs_path); |
| 173 | return true; |
| 174 | } |
| 175 | |
| 176 | uint8_t *StackLoadText(const char *path, size_t *size_out) { |
| 177 | uint8_t *mem = NULL; |
no test coverage detected