Help with Save/Loading savestates in Libretro API

Hi, I’m working on an open-source project where you can edit an SNES game, and the previous author included retro.dll, and libretro.h so that you could test the game in a real emulator inside the program. They were able to implement setting up a controller, getting the cores to work with a snes emulator, getting the game to actually run in the emulator (virtually), but they didn’t finish using saving and loading save states so the program just crashes when using hot keys for save/load. I looked at the libretro API the other day, but having never used it and only briefly hearing of Retroarch and Retropie I haven’t had a chance to use them, let only program anything.

So I see that using some functions serialize_size(), serialize(), and unserialize() somehow deal with save states, but I couldn’t see any examples. Is the best option to just view Retroarch source and just see how they did it, then kind of copy them?