we dont need 1 if level in ecore mainloop. it really isn't needed.

been harmless though.



SVN revision: 62682
This commit is contained in:
Carsten Haitzler 2011-08-22 09:32:39 +00:00
parent 15a3582483
commit ed6ed2987e
1 changed files with 44 additions and 46 deletions

View File

@ -1678,67 +1678,65 @@ _ecore_main_loop_iterate_internal(int once_only)
_ecore_timer_enable_new(); _ecore_timer_enable_new();
return; return;
} }
if (!_ecore_event_exist()) /* init flags */
have_event = have_signal = 0;
next_time = _ecore_timer_next_get();
/* no timers */
if (next_time < 0)
{ {
/* init flags */ /* no idlers */
have_event = have_signal = 0; if (!_ecore_idler_exist())
next_time = _ecore_timer_next_get();
/* no timers */
if (next_time < 0)
{ {
/* no idlers */ if (_ecore_main_select(-1.0) > 0) have_event = 1;
if (!_ecore_idler_exist())
{
if (_ecore_main_select(-1.0) > 0) have_event = 1;
}
/* idlers */
else
{
for (;;)
{
_ecore_time_loop_time = ecore_time_get();
if (!_ecore_idler_call()) goto start_loop;
if (_ecore_main_select(0.0) > 0) break;
if (_ecore_event_exist()) break;
if (_ecore_signal_count_get() > 0) break;
if (_ecore_timers_exists()) goto start_loop;
if (do_quit) break;
}
}
} }
/* timers */ /* idlers */
else else
{ {
/* no idlers */ for (;;)
if (!_ecore_idler_exist())
{ {
if (_ecore_main_select(next_time) > 0) have_event = 1; _ecore_time_loop_time = ecore_time_get();
} if (!_ecore_idler_call()) goto start_loop;
/* idlers */ if (_ecore_main_select(0.0) > 0) break;
else if (_ecore_event_exist()) break;
{ if (_ecore_signal_count_get() > 0) break;
for (;;) if (_ecore_timers_exists()) goto start_loop;
{ if (do_quit) break;
_ecore_time_loop_time = ecore_time_get();
if (!_ecore_idler_call()) goto start_loop;
if (_ecore_main_select(0.0) > 0) break;
if (_ecore_event_exist()) break;
if (_ecore_signal_count_get() > 0) break;
if (have_event || have_signal) break;
next_time = _ecore_timer_next_get();
if (next_time <= 0) break;
if (do_quit) break;
}
} }
} }
} }
/* timers */
else
{
/* no idlers */
if (!_ecore_idler_exist())
{
if (_ecore_main_select(next_time) > 0) have_event = 1;
}
/* idlers */
else
{
for (;;)
{
_ecore_time_loop_time = ecore_time_get();
if (!_ecore_idler_call()) goto start_loop;
if (_ecore_main_select(0.0) > 0) break;
if (_ecore_event_exist()) break;
if (_ecore_signal_count_get() > 0) break;
if (have_event || have_signal) break;
next_time = _ecore_timer_next_get();
if (next_time <= 0) break;
if (do_quit) break;
}
}
}
if (_ecore_fps_debug) t1 = ecore_time_get(); if (_ecore_fps_debug) t1 = ecore_time_get();
/* we came out of our "wait state" so idle has exited */ /* we came out of our "wait state" so idle has exited */
process_events:
if (!once_only) _ecore_idle_exiter_call(); if (!once_only) _ecore_idle_exiter_call();
/* call the fd handler per fd that became alive... */ /* call the fd handler per fd that became alive... */
/* this should read or write any data to the monitored fd and then */ /* this should read or write any data to the monitored fd and then */
/* post events onto the ecore event pipe if necessary */ /* post events onto the ecore event pipe if necessary */
process_events:
_ecore_main_fd_handlers_call(); _ecore_main_fd_handlers_call();
if (fd_handlers_with_buffer) if (fd_handlers_with_buffer)
_ecore_main_fd_handlers_buf_call(); _ecore_main_fd_handlers_buf_call();