libretro / beetle-saturn-libretro

Standalone hard fork of Mednafen Saturn to the libretro API.
GNU General Public License v2.0
22 stars 10 forks source link

Avoid malloc & memcpy in retro_serialize #18

Closed neil4 closed 1 year ago

neil4 commented 1 year ago

Improves Preemptive Frames and RunAhead performance by saving states directly to the passed-in buffer.

If the passed-in size is too small, MDFNSS_SaveSM will now malloc separate memory to complete the save, then retro_serialize frees it and returns false.