mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-13 04:51:38 -10:00
Each input query copied every event it looked at out of the array and, on big-endian, byte-swapped its id again. Compare in place against an id converted once, with the id checked first as it differs most between a frame's events. The netplay recorder's own lookup does the same. Key and input events were read and written one record at a time, though the arrays already have the file's layout: move each frame's events with one stream call straight to or from the array, and none for an empty list, which is most frames. The push functions build the event in its slot, after the capacity check, and playback passes key events on from the array.