| 1966 | } |
| 1967 | |
| 1968 | void VMManager::ZipSaveState(std::unique_ptr<ArchiveEntryList> elist, |
| 1969 | std::unique_ptr<SaveStateScreenshotData> screenshot, const char* filename, |
| 1970 | s32 slot_for_message, std::function<void(const std::string&)> error_callback) |
| 1971 | { |
| 1972 | Common::Timer timer; |
| 1973 | |
| 1974 | Error error; |
| 1975 | if (!SaveState_ZipToDisk(std::move(elist), std::move(screenshot), filename, &error)) |
| 1976 | { |
| 1977 | error_callback(error.GetDescription()); |
| 1978 | return; |
| 1979 | } |
| 1980 | |
| 1981 | if (slot_for_message >= 0 && VMManager::HasValidVM()) |
| 1982 | { |
| 1983 | Host::AddIconOSDMessage(fmt::format("SaveStateSlot{}", slot_for_message), ICON_FA_FLOPPY_DISK, |
| 1984 | fmt::format(TRANSLATE_FS("VMManager", "Saved state to slot {}."), slot_for_message), |
| 1985 | Host::OSD_QUICK_DURATION); |
| 1986 | } |
| 1987 | |
| 1988 | DevCon.WriteLn("Zipping save state to '%s' took %.2f ms", filename, timer.GetTimeMilliseconds()); |
| 1989 | } |
| 1990 | |
| 1991 | void VMManager::ZipSaveStateOnThread(std::unique_ptr<ArchiveEntryList> elist, |
| 1992 | std::unique_ptr<SaveStateScreenshotData> screenshot, std::string filename, |
nothing calls this directly
no test coverage detected