| 2408 | } |
| 2409 | |
| 2410 | void Write(uint8_t *buf, size_t size) override |
| 2411 | { |
| 2412 | /* We're in the process of shutting down, i.e. in "failure" mode. */ |
| 2413 | if (!this->file.has_value()) return; |
| 2414 | |
| 2415 | if (fwrite(buf, 1, size, *this->file) != size) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE); |
| 2416 | } |
| 2417 | |
| 2418 | void Finish() override |
| 2419 | { |