Main loop timing is too imprecise
Currently we count time in millliseconds and use g_timeout_add()
, which says in its docs:
Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. This is offset by the blocking from #30 though, so the game runs at normal speed if the delay
We should use a custom GSource
instead and count time in microseconds. There's no point in more precision than that as RetroArch counts time in microseconds, and that's what cores target.
Edited by Alice Mikhaylenko