Minor save state improvements
Created by: jdgleaver
This PR makes two small improvements to save state handling:
-
When loading floppy disk content via
m3u
files, restoring a save state now updates the frontend with the correct 'currently selected' disk index (previously this was left at whatever index was selected before restoring the state, which was often wrong and made for a confusing user interface...) -
When creating save states, the memory buffer is now created with the correct 'final' size (instead of relying on dynamic allocation, expanding as required). I didn't actually expect this to have much effect, but it turns out all those
realloc
s were quite expensive: previously I could only run at fullspeed with rewind enabled with a granularity of 4-5 frames - now I can drop this down to 3.