2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-main.c:
	(clutter_set_motion_events_frequency): Never allow the motion
	events devlivery frequency to exceed the default frame rate.
This commit is contained in:
Emmanuele Bassi 2007-12-06 12:38:04 +00:00
parent 6fae4bcfc9
commit dad823f123
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c:
(clutter_set_motion_events_frequency): Never allow the motion
events devlivery frequency to exceed the default frame rate.
2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.[ch]: Use gssize, size we allow -1

View File

@ -1780,7 +1780,8 @@ clutter_get_motion_events_frequency (void)
/**
* clutter_set_motion_events_frequency:
* @frequency: the number of motion events per second
* @frequency: the number of motion events per second, or 0 for the
* default value
*
* Sets the motion events frequency. Setting this to a non-zero value
* will override the default setting, so it should be rarely used.
@ -1798,5 +1799,6 @@ clutter_set_motion_events_frequency (guint frequency)
{
ClutterMainContext *context = clutter_context_get_default ();
context->motion_frequency = frequency;
/* never allow the motion events to exceed the default frame rate */
context->motion_frequency = CLAMP (frequency, 1, clutter_default_fps);
}