[Cogl] [PATCH v2] poll: Add general way to hook into mainloop without fd

Neil Roberts neil at linux.intel.com
Tue May 28 09:12:22 PDT 2013


Yup, that looks fine by me. Would you mind squashing in the following
changes to fix the WGL winsys too?

Reviewed-by: Neil Roberts <neil at linux.intel.com>

Regards,
- Neil

-- >8 --

---
 cogl/winsys/cogl-winsys-wgl.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cogl/winsys/cogl-winsys-wgl.c b/cogl/winsys/cogl-winsys-wgl.c
index 1e7fe4c..6a32e63 100644
--- a/cogl/winsys/cogl-winsys-wgl.c
+++ b/cogl/winsys/cogl-winsys-wgl.c
@@ -263,16 +263,16 @@ win32_event_filter_cb (MSG *msg, void *data)
   return COGL_FILTER_CONTINUE;
 }
 
-static CoglBool
-check_messages (void *user_data)
+static int64_t
+prepare_messages (void *user_data)
 {
   MSG msg;
 
-  return PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE) ? TRUE : FALSE;
+  return PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE) ? 0 : -1;
 }
 
 static void
-dispatch_messages (void *user_data)
+dispatch_messages (void *user_data, int revents)
 {
   MSG msg;
 
@@ -298,7 +298,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
       _cogl_poll_renderer_add_fd (renderer,
                                   WIN32_MSG_HANDLE,
                                   COGL_POLL_FD_EVENT_IN,
-                                  check_messages,
+                                  prepare_messages,
                                   dispatch_messages,
                                   renderer);
     }
-- 
1.7.11.3.g3c3efa5



More information about the Cogl mailing list