[retro-gtk] environment: Mark an error case as unlikely



commit 7e93c42abbd097e01f7ace0cbf1101d152c17485
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Dec 19 08:39:18 2020 +0100

    environment: Mark an error case as unlikely

 retro-runner/retro-environment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/retro-runner/retro-environment.c b/retro-runner/retro-environment.c
index 9acfb33..d2ba2a0 100644
--- a/retro-runner/retro-environment.c
+++ b/retro-runner/retro-environment.c
@@ -587,7 +587,7 @@ video_refresh_cb (guint8 *data,
   if (self->renderer) {
     gint pixel_size;
 
-    if (data && data != RETRO_HW_FRAME_BUFFER_VALID) {
+    if (G_UNLIKELY (data && data != RETRO_HW_FRAME_BUFFER_VALID)) {
       g_critical ("Video data must be NULL or RETRO_HW_FRAME_BUFFER_VALID if "
                   "rendering to hardware.");
 


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