{"action":"created","issue":{"url":"https://api.github.com/repos/libretro/PokeMini/issues/18","repository_url":"https://api.github.com/repos/libretro/PokeMini","labels_url":"https://api.github.com/repos/libretro/PokeMini/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/libretro/PokeMini/issues/18/comments","events_url":"https://api.github.com/repos/libretro/PokeMini/issues/18/events","html_url":"https://github.com/libretro/PokeMini/pull/18","id":384812520,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzOTI0NzAz","number":18,"title":"Implement proper handling of save states","user":{"login":"jdgleaver","id":38211560,"node_id":"MDQ6VXNlcjM4MjExNTYw","avatar_url":"https://avatars3.githubusercontent.com/u/38211560?v=4","gravatar_id":"","url":"https://api.github.com/users/jdgleaver","html_url":"https://github.com/jdgleaver","followers_url":"https://api.github.com/users/jdgleaver/followers","following_url":"https://api.github.com/users/jdgleaver/following{/other_user}","gists_url":"https://api.github.com/users/jdgleaver/gists{/gist_id}","starred_url":"https://api.github.com/users/jdgleaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdgleaver/subscriptions","organizations_url":"https://api.github.com/users/jdgleaver/orgs","repos_url":"https://api.github.com/users/jdgleaver/repos","events_url":"https://api.github.com/users/jdgleaver/events{/privacy}","received_events_url":"https://api.github.com/users/jdgleaver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-27T14:10:16Z","updated_at":"2018-12-10T17:31:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/libretro/PokeMini/pulls/18","html_url":"https://github.com/libretro/PokeMini/pull/18","diff_url":"https://github.com/libretro/PokeMini/pull/18.diff","patch_url":"https://github.com/libretro/PokeMini/pull/18.patch"},"body":"At present, the core implements save states via a nasty hack - it uses a temporary file as an intermediary between the serial data buffer provided by RetroArch and the internal save/load state functions. This is clumsy and has poor performance, but it is also potentially harmful: if run-ahead is enabled the core will write ~3MB/s to disk, which is pretty terrible if the user has an SSD or any other kind of flash storage. (In my defence, I implemented the hack before run-ahead existed, so it wasn't so bad at the time...)\r\n\r\nThis pull request does things properly, by adding functions to save/load states to/from a memory stream - so we now use the serialisation buffer directly, and temporary files are no longer required.\r\n\r\nI also removed the current ROM path from the save state data, since it has no purpose whatsoever. This bypasses the buffer overflows mentioned in PR #17."},"comment":{"url":"https://api.github.com/repos/libretro/PokeMini/issues/comments/445901420","html_url":"https://github.com/libretro/PokeMini/pull/18#issuecomment-445901420","issue_url":"https://api.github.com/repos/libretro/PokeMini/issues/18","id":445901420,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTkwMTQyMA==","user":{"login":"meepingsnesroms","id":1220805,"node_id":"MDQ6VXNlcjEyMjA4MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1220805?v=4","gravatar_id":"","url":"https://api.github.com/users/meepingsnesroms","html_url":"https://github.com/meepingsnesroms","followers_url":"https://api.github.com/users/meepingsnesroms/followers","following_url":"https://api.github.com/users/meepingsnesroms/following{/other_user}","gists_url":"https://api.github.com/users/meepingsnesroms/gists{/gist_id}","starred_url":"https://api.github.com/users/meepingsnesroms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meepingsnesroms/subscriptions","organizations_url":"https://api.github.com/users/meepingsnesroms/orgs","repos_url":"https://api.github.com/users/meepingsnesroms/repos","events_url":"https://api.github.com/users/meepingsnesroms/events{/privacy}","received_events_url":"https://api.github.com/users/meepingsnesroms/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T17:31:20Z","updated_at":"2018-12-10T17:31:20Z","author_association":"MEMBER","body":"From now on contact me here or on discord, I will merge instantly as long as you have tested it."}}
{"actor":{"display_login":"meepingsnesroms"}}