Commit af30028d authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

main-loop: Use lower priority

Use G_PRIORITY_DEFAULT_IDLE instead of G_PRIORITY_DEFAULT.

If the game can't run at full speed, slow it down instead of trying to
keep up and freezing everything.
parent aabfd24a
Pipeline #20159 passed with stages
in 9 minutes and 40 seconds
......@@ -293,7 +293,7 @@ retro_main_loop_start (RetroMainLoop *self)
// TODO What if fps <= 0?
fps = retro_core_get_frames_per_second (self->core);
self->loop = g_timeout_add_full (G_PRIORITY_DEFAULT,
self->loop = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
(guint) (1000 / (fps * self->speed_rate)),
(GSourceFunc) retro_main_loop_run,
g_object_ref (self),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment