MCPcopy Create free account
hub / github.com/clementgallet/libTAS / processArea

Method processArea

src/library/checkpoint/SaveStateSaving.cpp:61–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void SaveStateSaving::processArea(Area* area)
62{
63 /* Save the position of the first area page in the pages file */
64 area->page_offset = lseek(pfd, 0, SEEK_CUR);
65 MYASSERT(area->page_offset != -1)
66
67 /* Write the area struct */
68 if (Global::shared_config.savestate_settings & SharedConfig::SS_PRESENT)
69 area->uncommitted = area->isUncommitted(spmfd);
70 else
71 area->uncommitted = false;
72
73 /* Fill fd of deleted files, which may be used when loading the savestate */
74 area->fillDeletedFd();
75
76 // if (Global::shared_config.logging_level >= LL_DEBUG) {
77 // if (area->skip || area->uncommitted)
78 // area->hash = 0;
79 // else
80 // area->hash = XXH3_64bits(area->addr, area->size);
81 // }
82
83 Utils::writeAll(pmfd, area, sizeof(*area));
84
85 LZ4_resetStream_fast(&lz4s);
86}
87
88void SaveStateSaving::savePageFlag(char flag)
89{

Callers 2

writeAnAreaFunction · 0.80
writeSaveFilesFunction · 0.80

Calls 3

LZ4_resetStream_fastFunction · 0.85
isUncommittedMethod · 0.80
fillDeletedFdMethod · 0.80

Tested by

no test coverage detected