Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        ecore_main.c 


Log Message:


and check other fd's if our buffers have events too - just in case... :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore_main.c        13 May 2004 03:20:13 -0000      1.10
+++ ecore_main.c        9 Jun 2004 10:35:01 -0000       1.11
@@ -1,11 +1,21 @@
 #include "ecore_private.h"
 #include "Ecore.h"
 
+#define FIX_HZ 1   
+
 #include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
 
+#ifdef FIX_HZ
+#include <sys/param.h>
+#ifndef HZ
+#define HZ 100
+#endif
+#endif
+
+
 static int  _ecore_main_select(double timeout);
 static void _ecore_main_fd_handlers_cleanup(void);
 static void _ecore_main_fd_handlers_call(void);
@@ -243,14 +253,20 @@
    int            max_fd;
    int            ret;
    Ecore_Oldlist    *l;
-   
+
    t = NULL;
    if (timeout > 0.0)
      {
        int sec, usec;
-       
+
+#ifdef FIX_HZ
+       timeout += (0.5 / HZ);
        sec = (int)timeout;
        usec = (int)((timeout - (double)sec) * 1000000);
+#else  
+       sec = (int)timeout;
+       usec = (int)((timeout - (double)sec) * 1000000);
+#endif 
        tv.tv_sec = sec;
        tv.tv_usec = usec;
        t = &tv;
@@ -415,8 +431,11 @@
    while (_ecore_signal_count_get()) _ecore_signal_call();
    if (_ecore_event_exist())
      {
+       int ret;
+       
        have_event = 1;
        have_signal = 1;
+       ret = _ecore_main_select(0);
        goto process_events;
      }
    /* call idle enterers ... */
@@ -441,8 +460,11 @@
    /* if ther are any - jump to processing them */
    if (_ecore_event_exist())
      {
+       int ret;
+       
        have_event = 1;
        have_signal = 1;
+       ret = _ecore_main_select(0);
        goto process_events;
      }
    if (once_only)




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to