Libretro: Fixed run ahead performance issue (exclude screenshot from libretro save states)

This commit is contained in:
Sour 2020-02-01 18:13:42 -05:00
parent f3a18bed01
commit 4121949881

View file

@ -71,7 +71,9 @@ void SaveStateManager::GetSaveStateHeader(ostream &stream)
string sha1Hash = romInfo.Hash.Sha1;
stream.write(sha1Hash.c_str(), sha1Hash.size());
#ifndef LIBRETRO
SaveScreenshotData(stream);
#endif
string romName = romInfo.RomName;
uint32_t nameLength = (uint32_t)romName.size();
@ -173,10 +175,12 @@ bool SaveStateManager::LoadState(istream &stream, bool hashCheckRequired)
stream.read(hash, 40);
if(fileFormatVersion >= 13) {
#ifndef LIBRETRO
vector<uint8_t> frameData;
if(GetScreenshotData(frameData, stream)) {
_console->GetVideoDecoder()->UpdateFrameSync(frameData.data());
}
#endif
}
uint32_t nameLength = 0;