Closed clementgallet closed 5 years ago
I'm quite happy this this solution (f8d2394a0a7aa9d067d1803885d2207594fd48cd). It looks like it solves the problem in the above games. There is still a small problem resulting in lost fds in the following case:
Loading a savestate does not recover the positions in file descriptors. This leads to crashes in games that use files continuously, for example games like Deltarune or Hyper Light Drifter that use OGG decompression on the fly (I'm getting
ov_read error: -3
).An even worse problem is that loading a savestate won't be able to reopen closed files, because we are not guaranteed to obtain the same file descriptor. I don't have a good solution to this. It is still possible to:
read()
andwrite()
does not sound like a good idea).Edit: Well, solution 1 seems realistic after all.