Whitespace fixes

This commit is contained in:
Emmanuele Bassi 2010-01-27 21:16:28 +00:00
parent 2d5eeba5d8
commit 578e83e463
3 changed files with 28 additions and 18 deletions

View File

@ -132,7 +132,8 @@ clutter_frame_source_add (guint fps,
}
static gboolean
clutter_frame_source_prepare (GSource *source, gint *delay)
clutter_frame_source_prepare (GSource *source,
gint *delay)
{
ClutterFrameSource *frame_source = (ClutterFrameSource *) source;
GTimeVal current_time;

View File

@ -52,9 +52,12 @@ _clutter_timeout_interval_prepare (const GTimeVal *current_time,
ClutterTimeoutInterval *interval,
gint *delay)
{
guint elapsed_time
= _clutter_timeout_interval_get_ticks (current_time, interval);
guint new_frame_num = elapsed_time * interval->fps / 1000;
guint elapsed_time, new_frame_num;
elapsed_time = _clutter_timeout_interval_get_ticks (current_time,
interval);
new_frame_num = elapsed_time * interval->fps
/ 1000;
/* If time has gone backwards or the time since the last frame is
greater than the two frames worth then reset the time and do a
@ -67,6 +70,7 @@ _clutter_timeout_interval_prepare (const GTimeVal *current_time,
/* Reset the start time */
interval->start_time = *current_time;
/* Move the start time as if one whole frame has elapsed */
g_time_val_add (&interval->start_time, -(gint) frame_time * 1000);
@ -74,12 +78,14 @@ _clutter_timeout_interval_prepare (const GTimeVal *current_time,
if (delay)
*delay = 0;
return TRUE;
}
else if (new_frame_num > interval->frame_count)
{
if (delay)
*delay = 0;
return TRUE;
}
else
@ -87,6 +93,7 @@ _clutter_timeout_interval_prepare (const GTimeVal *current_time,
if (delay)
*delay = ((interval->frame_count + 1) * 1000 / interval->fps
- elapsed_time);
return FALSE;
}
}
@ -99,9 +106,10 @@ _clutter_timeout_interval_dispatch (ClutterTimeoutInterval *interval,
if ((* callback) (user_data))
{
interval->frame_count++;
return TRUE;
}
else
return FALSE;
}

View File

@ -472,7 +472,8 @@ clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
clutter_timeout_find_by_id)))
{
clutter_timeout_unref (l->data);
pool->dispatched_timeouts
= g_list_delete_link (pool->dispatched_timeouts, l);
pool->dispatched_timeouts =
g_list_delete_link (pool->dispatched_timeouts, l);
}
}