[retro-gtk] main-loop: Use lower priority



commit af30028d9ea4c88bb5f0bc47b2997b4645d6a047
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed Jul 18 23:54:02 2018 +0500

    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.

 retro-gtk/retro-main-loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/retro-gtk/retro-main-loop.c b/retro-gtk/retro-main-loop.c
index 1d39351..ad5ac30 100644
--- a/retro-gtk/retro-main-loop.c
+++ b/retro-gtk/retro-main-loop.c
@@ -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),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]