Closed RobLoach closed 6 years ago
It should use Kodi's frame time delta rather than ctime.
Can you explain why?
Also, is RunFrame the right place to call this?
The documentation says:
https://github.com/kodi-game/game.libretro/blob/master/src/libretro/libretro.h#L1783
It will be called right before retro_run() every frame.
Kodi may have a better API to get accurate tick count? Unsure if clock is the right thing to use here.
Using Kodi's timer may also allow fastforward/slowmotion gameplay via the media controls?
I don't understand. Isn't FF/RW controlled by Kodi? How does exposing the frame time give cores control over this?
Not sure, to be honest! Maybe clock()
is the way to go.
What cores use this feature?
ChaiLove does, to calculate the step time: https://github.com/libretro/libretro-chailove/blob/master/src/libretro.cpp#L286-L290
Closing this one for now. Feel free to re-open if it tickles your fancy.
Attempt to add the frame_time callback, to let cores know how much time has passed between frames. This has not been tested yet, as I haven't gotten it to compile yet. Would love your help on getting it to work.
It should use Kodi's frame time delta rather than ctime. Also, is RunFrame the right place to call this?
There's an example of its use over at sdlarch.c.