mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-backend-win32.c (clutter_backend_win32_init): Added a call to timeBeginPeriod. Without this the frame rates are terrible because the glib timeouts are not accurate enough. However this requires Glib >= 2.16.0 to take any effect because of a change in the way g_poll is implemented. See revision 6597 of glib. (clutter_backend_win32_finalize): Added a call to timeEndPeriod. * configure.ac: Added -lwinmm to the library dependencies for the Win32 backend.
This commit is contained in:
@ -89,6 +89,8 @@ clutter_backend_win32_finalize (GObject *gobject)
|
||||
{
|
||||
backend_singleton = NULL;
|
||||
|
||||
timeEndPeriod (1);
|
||||
|
||||
G_OBJECT_CLASS (clutter_backend_win32_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
@ -299,6 +301,11 @@ clutter_backend_win32_init (ClutterBackendWin32 *backend_win32)
|
||||
clutter_backend_set_double_click_time (backend, 250);
|
||||
clutter_backend_set_double_click_distance (backend, 5);
|
||||
clutter_backend_set_resolution (backend, 96.0);
|
||||
|
||||
/* Set the maximum precision for Windows time functions. Without
|
||||
this glib will not be able to sleep accurately enough to give a
|
||||
reasonable frame rate */
|
||||
timeBeginPeriod (1);
|
||||
}
|
||||
|
||||
GType
|
||||
|
Reference in New Issue
Block a user