| 619 | } |
| 620 | |
| 621 | bool GameList::WriteEntryToCache(const Entry* entry) |
| 622 | { |
| 623 | bool result = true; |
| 624 | result &= WriteString(s_cache_write_stream, entry->path); |
| 625 | result &= WriteString(s_cache_write_stream, entry->serial); |
| 626 | result &= WriteString(s_cache_write_stream, entry->title); |
| 627 | result &= WriteString(s_cache_write_stream, entry->title_sort); |
| 628 | result &= WriteString(s_cache_write_stream, entry->title_en); |
| 629 | result &= WriteU8(s_cache_write_stream, static_cast<u8>(entry->type)); |
| 630 | result &= WriteU8(s_cache_write_stream, static_cast<u8>(entry->region)); |
| 631 | result &= WriteU64(s_cache_write_stream, entry->total_size); |
| 632 | result &= WriteU64(s_cache_write_stream, static_cast<u64>(entry->last_modified_time)); |
| 633 | result &= WriteU32(s_cache_write_stream, entry->crc); |
| 634 | result &= WriteU8(s_cache_write_stream, static_cast<u8>(entry->compatibility_rating)); |
| 635 | |
| 636 | // flush after each entry, that way we don't end up with a corrupted file if we crash scanning. |
| 637 | if (result) |
| 638 | result = (std::fflush(s_cache_write_stream) == 0); |
| 639 | |
| 640 | return result; |
| 641 | } |
| 642 | |
| 643 | void GameList::CloseCacheFileStream() |
| 644 | { |
nothing calls this directly
no test coverage detected