mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 20:21:06 +00:00
TINSEL: Initialize remaining sound reels when loading old save
This commit is contained in:
parent
4ff3fe1586
commit
15d85c2f00
@ -341,6 +341,11 @@ static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd, int numInterp,
|
||||
int numReels = s.getVersion() >= 4 ? MAX_SOUNDREELS : 5;
|
||||
for (int i = 0; i < numReels; ++i)
|
||||
syncSoundReel(s, sd.SavedSoundReels[i]);
|
||||
// For old saves we zero the remaining sound reels
|
||||
if (s.isLoading() && numReels < MAX_SOUNDREELS) {
|
||||
const auto reelSize = sizeof sd.SavedSoundReels[0];
|
||||
memset(&sd.SavedSoundReels[numReels], 0, reelSize * (MAX_SOUNDREELS - numReels));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user