MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / FreezeBios

Method FreezeBios

pcsx2/SaveState.cpp:142–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool SaveStateBase::FreezeBios()
143{
144 if (!FreezeTag("BIOS"))
145 return false;
146
147 // Check the BIOS, and issue a warning if the bios for this state
148 // doesn't match the bios currently being used (chances are it'll still
149 // work fine, but some games are very picky).
150
151 u32 bioscheck = BiosChecksum;
152 char biosdesc[256];
153 std::memset(biosdesc, 0, sizeof(biosdesc));
154 StringUtil::Strlcpy(biosdesc, BiosDescription, sizeof(biosdesc));
155
156 Freeze(bioscheck);
157 Freeze(biosdesc);
158
159 if (bioscheck != BiosChecksum)
160 {
161 Console.Error("\n Warning: BIOS Version Mismatch, savestate may be unstable!");
162 Console.Error(
163 " Current BIOS: %s (crc=0x%08x)\n"
164 " Savestate BIOS: %s (crc=0x%08x)\n",
165 BiosDescription.c_str(), BiosChecksum,
166 biosdesc, bioscheck
167 );
168 }
169
170 return IsOkay();
171}
172
173bool SaveStateBase::FreezeInternals(Error* error)
174{

Callers 2

SaveState_DownloadStateFunction · 0.80

Calls 3

StrlcpyFunction · 0.85
ErrorMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected