[retro-gtk] environment: Log only positive variable update checks



commit ec5f2db256407ccd80d51a4aa4c6eb7edaa57ec3
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Dec 19 21:54:53 2020 +0100

    environment: Log only positive variable update checks
    
    This should avoid useless slowdowns.

 retro-runner/retro-environment.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/retro-runner/retro-environment.c b/retro-runner/retro-environment.c
index 7bddcc3..90beda0 100644
--- a/retro-runner/retro-environment.c
+++ b/retro-runner/retro-environment.c
@@ -397,7 +397,12 @@ get_variable_update (RetroCore *self,
 {
   *update = retro_core_get_variable_update (self);
 
-  retro_debug ("Get variable update: %s", TRUENESS (*update));
+  /* We purposefully don't log when no variable update is detected because it's
+   * not very useful to debug and it would print on every iteration, causing
+   * slowdowns.
+   */
+  if (*update)
+    retro_debug ("Get variable update: updated");
 
   return TRUE;
 }


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