libretro / fuse-libretro

A port of the Fuse Unix Spectrum Emulator to libretro
GNU General Public License v3.0
36 stars 46 forks source link

Fix netplay mode #130

Open trufanov-nok opened 2 years ago

trufanov-nok commented 2 years ago

It seems current Fuse doesn't work in Netplay mode bcs it updates the snapshot buffer in retro_serialize_size() and retro_serialize() just returrns its copy. Looks like authors found no way to estimate a snapshot size without making a real snapshot. In regular snapshot saving (F2 hotkey) retroarch calls retro_serialize_size() before retro_serialize() and authors decided to not making a snapshot in retro_serialize() again. That works, but not in a netplay mode. In Netplay mode retroarch calls retro_serialize_size() once at very beginning and then calls retro_serialize()every time it needs to sync host and players. As the snapshot isn't really updated this results in resetting the game with a snapshot of a spectrum boot menu for all players except the host.

This patch should fix this problem.