GNOME Bugzilla – Bug 770783
[nes] Serialization/deserialisation fails
Last modified: 2017-01-24 10:51:04 UTC
The libretro wiki says this is supposed to work. However, when trying to resume the game, I get this message in the terminal: ** (gnome-games:2): WARNING **: application-window.vala:300: [/app/lib/retro-1.0/plugins/nestopia_libretro.so] Unexpected serialization data size: got 21380, expected 21400 Is this a bug in Games or in the nestopia core?
Created attachment 340882 [details] [review] retro: Be more tolerant about serialization sizes We are having problems with Nestopia, which returns 21400 the first time, and then 21380 every time after that. With the current code, which checks for equality, we always fail to deserialize the Nestopia saved states. The libretro.h header has this to say about the function: // Returns the amount of data the implementation requires to serialize internal state (save states). // Beetween calls to retro_load_game() and retro_unload_game(), the returned size is never allowed to be larger than a previous returned value, to // ensure that the frontend can allocate a save state buffer once. They seem to implicitly acknowledge that this value can change, but that it can only ever be smaller than a previous value. This commit changes the check for equality into a check for inferiority, which makes loading a saved state for Nestopia work.
The following fixes have been pushed:
Comment on attachment 340882 [details] [review] retro: Be more tolerant about serialization sizes Committed with changes.