Closed Brunnis closed 5 years ago
After just a quick check in libretro.c, it looks like input is polled after running the emulator, which is the wrong way of doing it. See here:
https://github.com/libretro/snes9x2002/blob/master/libretro/libretro.c#L482
EDIT: And that would explain one of the two additional frames. The other one could well be caused by the main loop entry/exit point issue that was fixed a few years ago in the other snes9x cores (ifdef called LAG_FIX, if I remember correctly).
Pull request to fix this issue: https://github.com/libretro/snes9x2002/pull/33
I just noticed that this core has not one, but up to two added frames of input lag compared to the snes9x2005, snes2010 and snes9x cores. I believe this is a systematic issue affecting all games and all input running through this core. In practice, I think the added input lag should vary between one and two frames, depending on the frame processing time.
Testing can easily be carried out in the following way:
Examples:
Super Mario World (jumping) snes9x2002: 5 frames snes9x2005: 3 frames
Donkey Kong Country (jumping) snes9x2002: 4 frames snes9x2005: 2 frames